@thecb/components 10.2.4-beta.0 → 10.2.4-beta.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/index.cjs.js +3 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.js +7 -4
- package/src/components/atoms/layouts/examples/box-example/BoxExample.stories.js +2 -1
package/package.json
CHANGED
|
@@ -81,6 +81,7 @@ const ButtonWithAction = forwardRef(
|
|
|
81
81
|
},
|
|
82
82
|
ref
|
|
83
83
|
) => {
|
|
84
|
+
const isGhostVariant = variant === "ghost" || variant === "smallGhost";
|
|
84
85
|
const themeContext = useContext(ThemeContext);
|
|
85
86
|
const themeValues = createThemeValues(
|
|
86
87
|
themeContext,
|
|
@@ -110,9 +111,9 @@ const ButtonWithAction = forwardRef(
|
|
|
110
111
|
};
|
|
111
112
|
`;
|
|
112
113
|
const disabledStyles = `
|
|
113
|
-
background-color: #6D717E;
|
|
114
|
-
border-color: #6D717E;
|
|
115
|
-
color: #FFFFFF;
|
|
114
|
+
background-color: ${isGhostVariant ? "transparent;" : "#6D717E;"};
|
|
115
|
+
border-color: ${isGhostVariant ? "transparent;" : "#6D717E;"};
|
|
116
|
+
color: ${isGhostVariant ? "#6D717E;" : "#FFFFFF"};
|
|
116
117
|
cursor: default;
|
|
117
118
|
&:focus {
|
|
118
119
|
outline: 3px solid #6D717E;
|
|
@@ -155,7 +156,9 @@ const ButtonWithAction = forwardRef(
|
|
|
155
156
|
variant={themeValues.fontSizeVariant}
|
|
156
157
|
color={themeValues.color}
|
|
157
158
|
textWrap={textWrap}
|
|
158
|
-
extraStyles={
|
|
159
|
+
extraStyles={
|
|
160
|
+
disabled ? textExtraStyles + disabledStyles : textExtraStyles
|
|
161
|
+
}
|
|
159
162
|
>
|
|
160
163
|
{text}
|
|
161
164
|
</Text>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { text, radios, select } from "@storybook/addon-knobs";
|
|
2
|
+
import { boolean, text, radios, select } from "@storybook/addon-knobs";
|
|
3
3
|
|
|
4
4
|
import page from "../../../../../../.storybook/page";
|
|
5
5
|
import Box from "../../Box";
|
|
@@ -47,6 +47,7 @@ export const box = () => (
|
|
|
47
47
|
onFocus={text("onFocus", () => {}, groupId)}
|
|
48
48
|
onBlur={text("onBlur", () => {}, groupId)}
|
|
49
49
|
onTouchEnd={text("onTouchEnd", () => {}, groupId)}
|
|
50
|
+
disabled={boolean("disabled", false, groupId)}
|
|
50
51
|
>
|
|
51
52
|
Text Child
|
|
52
53
|
<LayoutContentBlock
|