Skip to content

Commit a72f42f

Browse files
authored
fix(Button): optimize styles (#662)
1 parent 6c18b43 commit a72f42f

File tree

4 files changed

+530
-209
lines changed

4 files changed

+530
-209
lines changed

.changeset/afraid-buses-warn.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+
Optimize Button style generation via more variants.

src/components/actions/Button/Button.stories.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const TemplateStates: StoryFn<CubeButtonProps> = ({
110110
disabled: false,
111111
}}
112112
>
113-
{label || 'Secondary'}
113+
{label || 'Default'}
114114
</Button>
115115
<Button
116116
{...props}
@@ -167,6 +167,19 @@ const TemplateStates: StoryFn<CubeButtonProps> = ({
167167
>
168168
{label || 'Disabled'}
169169
</Button>
170+
{['outline', 'neutral', 'clear'].includes(props.type) || !props.type ? (
171+
<Button
172+
{...props}
173+
mods={{
174+
pressed: false,
175+
focused: false,
176+
disabled: false,
177+
selected: true,
178+
}}
179+
>
180+
{label || 'Selected'}
181+
</Button>
182+
) : null}
170183
</Space>
171184
);
172185

@@ -242,6 +255,19 @@ const DarkTemplateStates: StoryFn<CubeButtonProps> = ({
242255
>
243256
{label || 'Disabled'}
244257
</Button>
258+
{['outline', 'neutral'].includes(props.type) || !props.type ? (
259+
<Button
260+
{...props}
261+
mods={{
262+
pressed: false,
263+
focused: false,
264+
disabled: false,
265+
selected: true,
266+
}}
267+
>
268+
{label || 'Selected'}
269+
</Button>
270+
) : null}
245271
</Space>
246272
);
247273

0 commit comments

Comments
 (0)