@unitedstatespowersquadrons/components 1.0.13 → 1.1.0-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,24 +99,18 @@ const BaseActionButton = (props: BaseActionButtonProps) => {
99
99
  } else if ("href" in props) {
100
100
  const { href, newTab } = props;
101
101
 
102
- const onClick = () => {
103
- if (newTab) {
104
- open(href, "_blank");
105
- } else {
106
- location.href = href;
107
- }
108
- };
109
-
110
102
  return(
111
- <button
112
- className={classNames("action-button", classes.button, className)}
103
+ <a
104
+ href={href}
113
105
  id={id}
114
- onClick={onClick}
106
+ rel={newTab ? "noreferrer" : undefined}
107
+ target={newTab ? "_blank" : undefined}
115
108
  title={title}
116
- type="button"
117
109
  >
118
- {children}
119
- </button>
110
+ <button className={classNames("action-button", classes.button, className)} type="button">
111
+ {children}
112
+ </button>
113
+ </a>
120
114
  );
121
115
  } else {
122
116
  throw new Error("Invalid BaseActionButton configuration: must specify props: onClick | (href & method?)");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unitedstatespowersquadrons/components",
3
- "version": "1.0.13",
3
+ "version": "1.1.0-pre.1",
4
4
  "description": "USPS shared React components library",
5
5
  "main": "index.tsx",
6
6
  "scripts": {