@@ -16,25 +16,29 @@ const meta = {
1616 type : "boolean" ,
1717 default : false
1818 } ,
19- variant : { table : { disable : true } }
19+ variant : {
20+ options : [ 'none' , 'normal' , 'filled' , 'outlined' ] ,
21+ control : { type : 'radio' } ,
22+ } ,
23+ color : { table : { disable : true } }
2024 }
2125}
2226
23- type ButtonStory = StoryObj < { icon : boolean , disabled : boolean } > ;
27+ type ButtonStory = StoryObj < { icon : boolean , disabled : boolean , variant : string } > ;
2428type ButtonGroupStory = StoryObj < typeof ButtonGroup > ;
2529
2630export default meta
2731
2832export const Buttons : ButtonStory = {
2933 render : ( args ) => {
3034
31- const { icon, disabled} = args
35+ const { icon, disabled, variant } = args
3236
3337 return < >
3438 {
3539 [ "primary" , "secondary" , "info" , "success" , "warning" , "error" ] . map ( value => {
3640 // @ts -ignore
37- return < Button disabled = { disabled } variant = { value } >
41+ return < Button disabled = { disabled } variant = { variant } color = { value } >
3842 { icon ? < Button . Icon > < IconAbc /> </ Button . Icon > : null }
3943 { value }
4044 </ Button >
@@ -44,7 +48,8 @@ export const Buttons: ButtonStory = {
4448 } ,
4549 args : {
4650 icon : true ,
47- disabled : false
51+ disabled : false ,
52+ variant : "normal"
4853 }
4954}
5055
@@ -55,7 +60,7 @@ export const ButtonGroups: ButtonGroupStory = {
5560 {
5661 [ "primary" , "secondary" , "info" , "success" , "warning" , "error" ] . map ( ( value , index ) => {
5762 // @ts -ignore
58- return < Button variant = { value } >
63+ return < Button color = { value } >
5964 { ( index % 2 ) == 0 ? < Button . Icon > < IconAbc /> </ Button . Icon > : null }
6065 { value }
6166 </ Button >
@@ -66,7 +71,7 @@ export const ButtonGroups: ButtonGroupStory = {
6671 {
6772 [ "primary" , "primary" , "primary" , "primary" ] . map ( ( value , index ) => {
6873 // @ts -ignore
69- return < Button variant = { value } >
74+ return < Button color = { value } >
7075 { ( index % 2 ) == 0 ? < Button . Icon > < IconAbc /> </ Button . Icon > : null }
7176 { value }
7277 </ Button >
@@ -78,14 +83,13 @@ export const ButtonGroups: ButtonGroupStory = {
7883 {
7984 [ "secondary" , "secondary" , "secondary" , "secondary" ] . map ( ( value , index ) => {
8085 // @ts -ignore
81- return < Button disabled = { ( index % 2 ) == 0 } variant = { value } >
86+ return < Button disabled = { ( index % 2 ) == 0 } color = { value } >
8287 { ( index % 2 ) == 0 ? < Button . Icon > < IconAbc /> </ Button . Icon > : null }
8388 { value }
8489 </ Button >
8590 } )
8691 }
8792 </ ButtonGroup >
88-
8993 </ >
9094 }
9195}
0 commit comments