@justfixnyc/component-library 0.42.0 → 0.42.2
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.
package/dist/src/index.es.js
CHANGED
|
@@ -110,11 +110,10 @@ const Link = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
110
110
|
icon,
|
|
111
111
|
children,
|
|
112
112
|
className,
|
|
113
|
-
target,
|
|
114
113
|
...props
|
|
115
114
|
} = _ref;
|
|
116
115
|
const linkClassNames = classNames('jfcl-link', className);
|
|
117
|
-
const opensInNewTab = target === '_blank';
|
|
116
|
+
const opensInNewTab = props.target === '_blank';
|
|
118
117
|
// When using this component within a react-router-dom <Link />, a navigate function is passed through the props us here.
|
|
119
118
|
// Since this navigate function is not a normal anchor element attribute we want to remove it before applying the rest of
|
|
120
119
|
// the props to avoid browser errors.
|
package/dist/src/index.js
CHANGED
|
@@ -121,11 +121,10 @@ const Link = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
121
121
|
icon,
|
|
122
122
|
children,
|
|
123
123
|
className,
|
|
124
|
-
target,
|
|
125
124
|
...props
|
|
126
125
|
} = _ref;
|
|
127
126
|
const linkClassNames = classNames__default["default"]('jfcl-link', className);
|
|
128
|
-
const opensInNewTab = target === '_blank';
|
|
127
|
+
const opensInNewTab = props.target === '_blank';
|
|
129
128
|
// When using this component within a react-router-dom <Link />, a navigate function is passed through the props us here.
|
|
130
129
|
// Since this navigate function is not a normal anchor element attribute we want to remove it before applying the rest of
|
|
131
130
|
// the props to avoid browser errors.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './styles.scss';
|
|
3
3
|
export type LinkIcon = 'internal' | 'external';
|
|
4
4
|
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
@@ -6,6 +6,5 @@ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>
|
|
|
6
6
|
className?: string;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
navigate?: () => void;
|
|
9
|
-
target?: HTMLAttributeAnchorTarget;
|
|
10
9
|
}
|
|
11
10
|
export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|