1
1
import { Meta , Story , Canvas , ArgsTable } from ' @storybook/addon-docs' ;
2
2
3
3
import { Information , Plus , Write } from ' @strapi/icons' ;
4
- import { Button , Box , Stack } from ' @strapi/design-system' ;
4
+ import { Button , Box , Flex } from ' @strapi/design-system' ;
5
5
6
6
<Meta title = " Design System/Components/Button" component = { Button } />
7
7
@@ -57,11 +57,11 @@ Use the size prop to change the size of the button. You can set the value to `S`
57
57
},
58
58
}}
59
59
>
60
- <Stack spacing = { 1 } horizontal >
60
+ <Flex gap = { 1 } >
61
61
<Button size = " S" >Small</Button >
62
62
<Button size = " M" >Medium</Button >
63
63
<Button size = " L" >Large</Button >
64
- </Stack >
64
+ </Flex >
65
65
</Story >
66
66
</Canvas >
67
67
@@ -86,15 +86,15 @@ Use the variant prop to change the visual style of the Button. You can set the v
86
86
},
87
87
}}
88
88
>
89
- <Stack spacing = { 2 } horizontal >
89
+ <Flex gap = { 2 } >
90
90
{ [' default' , ' secondary' , ' tertiary' , ' success' , ' danger' , ' success-light' , ' danger-light' , ' ghost' ].map (
91
91
(variant ) => (
92
92
<Button onClick = { (e ) => console .log (e )} variant = { variant } key = { variant } >
93
93
{ variant }
94
94
</Button >
95
95
),
96
96
)}
97
- </Stack >
97
+ </Flex >
98
98
</Story >
99
99
</Canvas >
100
100
@@ -130,7 +130,7 @@ You can add start and end icons to the Button component using the `startIcon` an
130
130
},
131
131
}}
132
132
>
133
- <Stack spacing = { 2 } horizontal >
133
+ <Flex gap = { 2 } >
134
134
<Button startIcon = { <Information />} >Information</Button >
135
135
<Button variant = " secondary" endIcon = { <Write />} >
136
136
Write content
@@ -139,7 +139,7 @@ You can add start and end icons to the Button component using the `startIcon` an
139
139
With a loader
140
140
</Button >
141
141
<Button startIcon = { <Plus />} >Woops</Button >
142
- </Stack >
142
+ </Flex >
143
143
</Story >
144
144
</Canvas >
145
145
0 commit comments