@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "10.2.4-beta.0",
3
+ "version": "10.2.4-beta.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -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={textExtraStyles}
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