Skip to content

Commit abfe32e

Browse files
committed
Add WithIcon story
1 parent 5cb8554 commit abfe32e

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

packages/components/src/components/Button/Button.stories.tsx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { css } from '@devup-ui/react'
12
import { Meta } from '@storybook/react-vite'
23

34
import { Button } from './index'
@@ -18,14 +19,29 @@ const meta: Meta<typeof Button> = {
1819
export const Default = {
1920
args: {
2021
children: 'Button Text',
21-
variant: 'default',
22-
disabled: false,
23-
colors: {
24-
primary: 'var(--primary)',
25-
error: 'var(--error)',
26-
},
27-
isError: false,
28-
size: 'm',
22+
},
23+
}
24+
25+
export const WithIcon = {
26+
args: {
27+
children: 'Button text',
28+
icon: (
29+
<svg
30+
className={css({ color: '$text' })}
31+
fill="none"
32+
height="24"
33+
viewBox="0 0 24 24"
34+
width="24"
35+
xmlns="http://www.w3.org/2000/svg"
36+
>
37+
<path
38+
clipRule="evenodd"
39+
d="M16.2635 4.3205C15.8763 3.90288 15.2518 3.89202 14.8523 4.29596L6.92714 12.3101C6.77288 12.4661 6.66766 12.6701 6.6262 12.8938L6.19139 15.2388C6.04942 16.0044 6.67528 16.6795 7.38514 16.5264L9.56701 16.0557C9.74988 16.0163 9.91913 15.9232 10.0562 15.7868L16.6085 9.26287C16.6164 9.25496 16.6242 9.24687 16.6319 9.23862L18.0101 7.75198C18.4063 7.32464 18.4063 6.63179 18.0101 6.20445L16.2635 4.3205ZM15.1465 6.39842L15.5325 6.00805L16.4319 6.97821L16.058 7.38159L15.1465 6.39842ZM13.9617 7.59651L14.8868 8.59436L9.08091 14.3751L7.96212 14.6164L8.17961 13.4435L13.9617 7.59651ZM5.91304 18.0303C5.40878 18.0303 5 18.4712 5 19.0152C5 19.5591 5.40878 20 5.91304 20H18.087C18.5912 20 19 19.5591 19 19.0152C19 18.4712 18.5912 18.0303 18.087 18.0303H5.91304Z"
40+
fill="currentColor"
41+
fillRule="evenodd"
42+
/>
43+
</svg>
44+
),
2945
},
3046
}
3147

0 commit comments

Comments
 (0)