@mackin.com/styleguide 9.11.1 → 9.11.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/index.esm.js +10 -4
- package/index.js +10 -4
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -3051,10 +3051,16 @@ const OmniLink = (props) => {
|
|
|
3051
3051
|
return (React.createElement("a", Object.assign({}, linkProps, { target: props.target, className: mainClassName }), content));
|
|
3052
3052
|
}
|
|
3053
3053
|
const isDisabled = props.disabled || props.waiting;
|
|
3054
|
-
return (React.createElement(Link$1, Object.assign({}, linkProps, { className: mainClassName, to: props.href, onClick:
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3054
|
+
return (React.createElement(Link$1, Object.assign({}, linkProps, { className: mainClassName, to: props.href, onClick: e => {
|
|
3055
|
+
var _a;
|
|
3056
|
+
if (isDisabled) {
|
|
3057
|
+
e.stopPropagation();
|
|
3058
|
+
e.preventDefault();
|
|
3059
|
+
}
|
|
3060
|
+
else {
|
|
3061
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
3062
|
+
}
|
|
3063
|
+
} }), content));
|
|
3058
3064
|
};
|
|
3059
3065
|
|
|
3060
3066
|
const roundPxPadding = '4px';
|
package/index.js
CHANGED
|
@@ -3078,10 +3078,16 @@ const OmniLink = (props) => {
|
|
|
3078
3078
|
return (React__namespace.createElement("a", Object.assign({}, linkProps, { target: props.target, className: mainClassName }), content));
|
|
3079
3079
|
}
|
|
3080
3080
|
const isDisabled = props.disabled || props.waiting;
|
|
3081
|
-
return (React__namespace.createElement(reactRouterDom.Link, Object.assign({}, linkProps, { className: mainClassName, to: props.href, onClick:
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3081
|
+
return (React__namespace.createElement(reactRouterDom.Link, Object.assign({}, linkProps, { className: mainClassName, to: props.href, onClick: e => {
|
|
3082
|
+
var _a;
|
|
3083
|
+
if (isDisabled) {
|
|
3084
|
+
e.stopPropagation();
|
|
3085
|
+
e.preventDefault();
|
|
3086
|
+
}
|
|
3087
|
+
else {
|
|
3088
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
3089
|
+
}
|
|
3090
|
+
} }), content));
|
|
3085
3091
|
};
|
|
3086
3092
|
|
|
3087
3093
|
const roundPxPadding = '4px';
|