@mackin.com/styleguide 9.11.0 → 9.11.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.
- package/index.esm.js +10 -4
- package/index.js +10 -4
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -4663,10 +4663,16 @@ const Link = (props) => {
|
|
|
4663
4663
|
return React.createElement(Text, { className: mainClassName, tag: "div" }, props.children);
|
|
4664
4664
|
}
|
|
4665
4665
|
const isDisabled = props.disabled || props.waiting;
|
|
4666
|
-
return (React.createElement("a", Object.assign({}, linkProps, { tabIndex: disabled ? -1 : undefined, target: props.target, className: mainClassName, onClick:
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4666
|
+
return (React.createElement("a", Object.assign({}, linkProps, { tabIndex: disabled ? -1 : undefined, target: props.target, className: mainClassName, onClick: e => {
|
|
4667
|
+
var _a;
|
|
4668
|
+
if (isDisabled) {
|
|
4669
|
+
e.stopPropagation();
|
|
4670
|
+
e.preventDefault();
|
|
4671
|
+
}
|
|
4672
|
+
else {
|
|
4673
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
4674
|
+
}
|
|
4675
|
+
} }),
|
|
4670
4676
|
React.createElement(LinkContent, Object.assign({}, props))));
|
|
4671
4677
|
};
|
|
4672
4678
|
|
package/index.js
CHANGED
|
@@ -4690,10 +4690,16 @@ const Link = (props) => {
|
|
|
4690
4690
|
return React__namespace.createElement(Text, { className: mainClassName, tag: "div" }, props.children);
|
|
4691
4691
|
}
|
|
4692
4692
|
const isDisabled = props.disabled || props.waiting;
|
|
4693
|
-
return (React__namespace.createElement("a", Object.assign({}, linkProps, { tabIndex: disabled ? -1 : undefined, target: props.target, className: mainClassName, onClick:
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4693
|
+
return (React__namespace.createElement("a", Object.assign({}, linkProps, { tabIndex: disabled ? -1 : undefined, target: props.target, className: mainClassName, onClick: e => {
|
|
4694
|
+
var _a;
|
|
4695
|
+
if (isDisabled) {
|
|
4696
|
+
e.stopPropagation();
|
|
4697
|
+
e.preventDefault();
|
|
4698
|
+
}
|
|
4699
|
+
else {
|
|
4700
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
4701
|
+
}
|
|
4702
|
+
} }),
|
|
4697
4703
|
React__namespace.createElement(LinkContent, Object.assign({}, props))));
|
|
4698
4704
|
};
|
|
4699
4705
|
|