@thecb/components 4.2.7-beta.1 → 4.2.7-beta.3
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/index.cjs.js
CHANGED
|
@@ -12684,14 +12684,16 @@ var ButtonWithAction = function ButtonWithAction(_ref2) {
|
|
|
12684
12684
|
_ref2$extraStyles = _ref2.extraStyles,
|
|
12685
12685
|
extraStyles = _ref2$extraStyles === void 0 ? "" : _ref2$extraStyles,
|
|
12686
12686
|
tabIndex = _ref2.tabIndex,
|
|
12687
|
-
children = _ref2.children
|
|
12687
|
+
children = _ref2.children,
|
|
12688
|
+
rest = _objectWithoutProperties(_ref2, ["action", "variant", "text", "isLoading", "dataQa", "textExtraStyles", "contentOverride", "extraStyles", "tabIndex", "children"]);
|
|
12689
|
+
|
|
12688
12690
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
12689
12691
|
var themeValues = createThemeValues(themeContext, fallbackValues$1, "Button", variant);
|
|
12690
12692
|
var isMobile = themeContext.isMobile;
|
|
12691
12693
|
var hoverStyles = "\n outline: none;\n background-color: ".concat(themeValues.hoverBackgroundColor, ";\n border-color: ").concat(themeValues.hoverBorderColor, ";\n color: ").concat(themeValues.hoverColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n cursor: pointer;\n ");
|
|
12692
12694
|
var activeStyles = "\n outline: none;\n background-color: ".concat(themeValues.activeBackgroundColor, ";\n border-color: ").concat(themeValues.activeBorderColor, ";\n color: ").concat(themeValues.activeColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n ");
|
|
12693
|
-
var disabledStyles = "\n background-
|
|
12694
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
12695
|
+
var disabledStyles = "\n background-color: #6D717E;\n border-color: #6D717E;\n color: #FFFFFF;\n &:focus {\n box-shadow: 0 0 10px #6D717E;\n outline: none;\n }\n ";
|
|
12696
|
+
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
12695
12697
|
variant: variant,
|
|
12696
12698
|
padding: themeValues.padding,
|
|
12697
12699
|
minHeight: themeValues.height,
|
|
@@ -12708,7 +12710,7 @@ var ButtonWithAction = function ButtonWithAction(_ref2) {
|
|
|
12708
12710
|
extraStyles: "margin: 0.5rem; ".concat(extraStyles),
|
|
12709
12711
|
dataQa: dataQa,
|
|
12710
12712
|
tabIndex: tabIndex
|
|
12711
|
-
}, contentOverride ? children : /*#__PURE__*/React__default.createElement(Center, {
|
|
12713
|
+
}, rest), contentOverride ? children : /*#__PURE__*/React__default.createElement(Center, {
|
|
12712
12714
|
intrinsic: true
|
|
12713
12715
|
}, isLoading ? /*#__PURE__*/React__default.createElement(Spinner, {
|
|
12714
12716
|
isMobile: isMobile
|
package/package.json
CHANGED
|
@@ -70,7 +70,8 @@ const ButtonWithAction = ({
|
|
|
70
70
|
contentOverride = false,
|
|
71
71
|
extraStyles = "",
|
|
72
72
|
tabIndex,
|
|
73
|
-
children
|
|
73
|
+
children,
|
|
74
|
+
...rest
|
|
74
75
|
}) => {
|
|
75
76
|
const themeContext = useContext(ThemeContext);
|
|
76
77
|
const themeValues = createThemeValues(
|
|
@@ -101,7 +102,7 @@ const ButtonWithAction = ({
|
|
|
101
102
|
};
|
|
102
103
|
`;
|
|
103
104
|
const disabledStyles = `
|
|
104
|
-
background-
|
|
105
|
+
background-color: #6D717E;
|
|
105
106
|
border-color: #6D717E;
|
|
106
107
|
color: #FFFFFF;
|
|
107
108
|
&:focus {
|
|
@@ -128,6 +129,7 @@ const ButtonWithAction = ({
|
|
|
128
129
|
extraStyles={`margin: 0.5rem; ${extraStyles}`}
|
|
129
130
|
dataQa={dataQa}
|
|
130
131
|
tabIndex={tabIndex}
|
|
132
|
+
{...rest}
|
|
131
133
|
>
|
|
132
134
|
{contentOverride ? (
|
|
133
135
|
children
|