Skip to content

Commit f10297b

Browse files
committed
fix(Radio): button styles
1 parent e8ced85 commit f10297b

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

.changeset/wet-points-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Fix Radio.Button styles.

src/components/fields/RadioGroup/Radio.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,22 @@ const RadioButtonElement = tasty({
7777
'': '#white',
7878
hovered: '#purple-text.04',
7979
checked: '#white',
80-
disabled: '#dark.04',
80+
disabled: '#light',
8181
},
8282
color: {
8383
'': '#dark.85',
8484
invalid: '#danger-text',
85-
disabled: '#dark.40',
85+
checked: '#purple-text',
86+
disabled: '#dark-04',
87+
'disabled & checked': '#dark-02',
8688
},
8789
preset: 't3m',
8890
border: {
8991
'': '#dark-05',
9092
checked: '#purple-text',
9193
'invalid & checked': '#danger-text',
92-
'disabled & checked': '#dark.40',
9394
disabled: '#dark-05',
95+
'disabled & checked': '#dark-03',
9496
},
9597
padding: '(.75x - 1bw) (1.25x - 1bw)',
9698
cursor: 'pointer',
@@ -123,7 +125,7 @@ const RadioNormalElement = tasty({
123125
'disabled & checked': '#dark.12',
124126
},
125127
border: {
126-
'': '#dark.30',
128+
'': '#border-opaque',
127129
checked: '#purple-text',
128130
invalid: '#danger-text.50',
129131
disabled: '#dark.12',

src/components/fields/RadioGroup/RadioGroup.stories.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ export default {
3131
};
3232

3333
const Template: StoryFn<CubeRadioGroupProps> = (args) => (
34-
<Radio.Group {...args}>
34+
<Radio.Group defaultValue="yes" {...args}>
3535
<Radio value="yes">Yes</Radio>
3636
<Radio value="no">No</Radio>
3737
</Radio.Group>
3838
);
3939

4040
const RadioButtonsTemplate: StoryFn<CubeRadioGroupProps> = (args) => (
41-
<Radio.Group {...args}>
41+
<Radio.Group defaultValue="yes" {...args}>
4242
<Radio.Button value="yes">Yes</Radio.Button>
4343
<Radio type="button" value="no">
4444
No
@@ -47,7 +47,7 @@ const RadioButtonsTemplate: StoryFn<CubeRadioGroupProps> = (args) => (
4747
);
4848

4949
const SolidRadioButtonsTemplate: StoryFn<CubeRadioGroupProps> = (args) => (
50-
<Radio.ButtonGroup {...args} defaultValue="no">
50+
<Radio.ButtonGroup defaultValue="no" {...args}>
5151
<Radio.Button value="yes">Yes</Radio.Button>
5252
<Radio.Button value="no">No</Radio.Button>
5353
<Radio.Button value="maybe">Maybe</Radio.Button>
@@ -99,3 +99,6 @@ RadioGroupWithLabelAndSuffix.args = {
9999
};
100100

101101
export const SolidRadioButtons = SolidRadioButtonsTemplate.bind({});
102+
103+
export const SolidRadioButtonsDisabled = SolidRadioButtonsTemplate.bind({});
104+
SolidRadioButtonsDisabled.args = { isDisabled: true };

0 commit comments

Comments
 (0)