@citygross/components 0.8.52 → 0.8.53
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.
|
@@ -23,5 +23,6 @@ export declare type TCgButton = {
|
|
|
23
23
|
fullWidth?: boolean;
|
|
24
24
|
buttonRef?: React.Ref<HTMLButtonElement>;
|
|
25
25
|
round?: boolean;
|
|
26
|
+
shouldPreventDefault?: boolean;
|
|
26
27
|
};
|
|
27
|
-
export declare const CgButton: ({ size, variant, icon, flexReverse, disabled, onClick, children, loading, fullWidth, buttonRef, round }: TCgButton) => JSX.Element;
|
|
28
|
+
export declare const CgButton: ({ size, variant, icon, flexReverse, disabled, onClick, children, loading, fullWidth, buttonRef, round, shouldPreventDefault }: TCgButton) => JSX.Element;
|
|
@@ -25,13 +25,13 @@ exports.EButtonVariant = void 0;
|
|
|
25
25
|
EButtonVariant[EButtonVariant["ghost"] = 4] = "ghost";
|
|
26
26
|
})(exports.EButtonVariant || (exports.EButtonVariant = {}));
|
|
27
27
|
var CgButton = function (_a) {
|
|
28
|
-
var size = _a.size, variant = _a.variant, icon = _a.icon, flexReverse = _a.flexReverse, disabled = _a.disabled, onClick = _a.onClick, children = _a.children, loading = _a.loading, fullWidth = _a.fullWidth, buttonRef = _a.buttonRef, round = _a.round;
|
|
28
|
+
var size = _a.size, variant = _a.variant, icon = _a.icon, flexReverse = _a.flexReverse, disabled = _a.disabled, onClick = _a.onClick, children = _a.children, loading = _a.loading, fullWidth = _a.fullWidth, buttonRef = _a.buttonRef, round = _a.round, _b = _a.shouldPreventDefault, shouldPreventDefault = _b === void 0 ? true : _b;
|
|
29
29
|
return (React__default["default"].createElement(CgButton_styles.CgButtonContainer, { ref: buttonRef, round: round, size: size, variant: variant, isIconOnly: !children, flexReverse: flexReverse, disabled: disabled || loading, fullWidth: fullWidth, loading: loading, onKeyDown: function (event) {
|
|
30
30
|
if (event.key === 'Enter') {
|
|
31
31
|
onClick && onClick();
|
|
32
32
|
}
|
|
33
33
|
}, onClick: function (e) {
|
|
34
|
-
e.preventDefault();
|
|
34
|
+
shouldPreventDefault && e.preventDefault();
|
|
35
35
|
onClick && onClick();
|
|
36
36
|
} },
|
|
37
37
|
React__default["default"].createElement(CgButton_styles.CgButtonContent, { size: size, flexReverse: flexReverse, loading: loading },
|
|
@@ -17,13 +17,13 @@ var EButtonVariant;
|
|
|
17
17
|
EButtonVariant[EButtonVariant["ghost"] = 4] = "ghost";
|
|
18
18
|
})(EButtonVariant || (EButtonVariant = {}));
|
|
19
19
|
var CgButton = function (_a) {
|
|
20
|
-
var size = _a.size, variant = _a.variant, icon = _a.icon, flexReverse = _a.flexReverse, disabled = _a.disabled, onClick = _a.onClick, children = _a.children, loading = _a.loading, fullWidth = _a.fullWidth, buttonRef = _a.buttonRef, round = _a.round;
|
|
20
|
+
var size = _a.size, variant = _a.variant, icon = _a.icon, flexReverse = _a.flexReverse, disabled = _a.disabled, onClick = _a.onClick, children = _a.children, loading = _a.loading, fullWidth = _a.fullWidth, buttonRef = _a.buttonRef, round = _a.round, _b = _a.shouldPreventDefault, shouldPreventDefault = _b === void 0 ? true : _b;
|
|
21
21
|
return (React.createElement(CgButtonContainer, { ref: buttonRef, round: round, size: size, variant: variant, isIconOnly: !children, flexReverse: flexReverse, disabled: disabled || loading, fullWidth: fullWidth, loading: loading, onKeyDown: function (event) {
|
|
22
22
|
if (event.key === 'Enter') {
|
|
23
23
|
onClick && onClick();
|
|
24
24
|
}
|
|
25
25
|
}, onClick: function (e) {
|
|
26
|
-
e.preventDefault();
|
|
26
|
+
shouldPreventDefault && e.preventDefault();
|
|
27
27
|
onClick && onClick();
|
|
28
28
|
} },
|
|
29
29
|
React.createElement(CgButtonContent, { size: size, flexReverse: flexReverse, loading: loading },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.53",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"react-slick": "^0.30.1",
|
|
77
77
|
"slick-carousel": "^1.8.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "37a80c1cd8b8b73ba9e71c77300f7b3126f35377"
|
|
80
80
|
}
|