Skip to content

Commit c64304f

Browse files
authored
Merge pull request #10859 from ethereum/button-disabled-styles
Button - Fix disabled styles in solid variant
2 parents d34da17 + f25d7ff commit c64304f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/@chakra-ui/gatsby-plugin/components/Button.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ const variantSolid = defineStyle({
3939
color: "background.base",
4040
bg: "primary.base",
4141
borderColor: "transparent",
42+
_disabled: {
43+
bg: "disabled",
44+
color: "background.base",
45+
},
4246
_hover: {
4347
color: "background.base",
4448
bg: "primary.hover",

src/@chakra-ui/gatsby-plugin/semanticTokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const semanticTokens = {
6060
base: { _light: "white", _dark: "gray.700" },
6161
highlight: { _light: "gray.100", _dark: "gray.900" },
6262
},
63-
disabled: { _light: "gray.300", _dark: "gray.500" },
63+
disabled: { _light: "gray.400", _dark: "gray.500" },
6464
// ! Deprecating neutral
6565
neutral: { _light: "white", _dark: "gray.900" },
6666

src/components/Button/Button.stories.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ export const StyleVariants: Story = {
4747
<VStack spacing={4}>
4848
{variants.map((variant, idx) => {
4949
if (args.isSecondary && variant === "solid") return
50-
return <Button key={idx} variant={variant} {...args} />
50+
return (
51+
<HStack spacing={4} key={idx}>
52+
<Button variant={variant} {...args} />
53+
<Button variant={variant} isDisabled {...args} />
54+
</HStack>
55+
)
5156
})}
5257
</VStack>
5358
),

0 commit comments

Comments
 (0)