@@ -11,65 +11,79 @@ export default {
11
11
title : 'Buttons/Button Group' ,
12
12
component : 'uui-button-group' ,
13
13
id : 'uui-button-group' ,
14
+ args : {
15
+ look : '' ,
16
+ } ,
17
+ argTypes : {
18
+ look : {
19
+ control : {
20
+ type : 'select' ,
21
+ } ,
22
+ options : InterfaceLookNames ,
23
+ } ,
24
+ } ,
14
25
} ;
15
26
16
- const buttons = [ 'development' , 'staging' , 'live' ] ;
27
+ export const AAAOverview : Story = props => html `
28
+ < uui-button-group >
29
+ < uui-button look ="${ props . look } " label ="Button 1 "> </ uui-button >
30
+ < uui-button look ="${ props . look } " label ="Button 2 "> </ uui-button >
31
+ < uui-button look ="${ props . look } " label ="Button 3 "> </ uui-button >
32
+ < uui-button look ="${ props . look } " label ="Button 4 "> </ uui-button >
33
+ </ uui-button-group >
34
+ ` ;
17
35
18
- export const AAAOverview : Story = ( ) =>
19
- html `< uui-button-group
20
- > ${ buttons . map (
21
- el => html `< uui-button look ="secondary "> ${ el } </ uui-button > `
22
- ) } </ uui-button-group
23
- > ` ;
24
36
AAAOverview . storyName = 'Overview' ;
25
- AAAOverview . parameters = {
26
- docs : {
27
- source : {
28
- code : html `< uui-button-group >
29
- < uui-button look ="secondary "> development</ uui-button >
30
- < uui-button look ="secondary "> staging</ uui-button >
31
- < uui-button look ="secondary "> live</ uui-button >
32
- </ uui-button-group > ` . strings ,
33
- } ,
34
- } ,
35
- } ;
36
37
37
- function uppercaseFirstLetter ( s : string ) {
38
- return s . charAt ( 0 ) . toUpperCase ( ) + s . slice ( 1 ) ;
39
- }
40
- export const AllStyles = ( ) => html `
38
+ export const Looks = ( ) => html `
41
39
${ InterfaceLookNames . map (
42
40
( lookName : InterfaceLookType ) =>
43
- html ` < uui-button-group >
44
- < uui-button .look =${ lookName } >
45
- ${ uppercaseFirstLetter ( lookName ) } look
46
- </ uui-button >
47
- < uui-button .look =${ lookName } > Second option </ uui-button >
48
- < uui-button .look =${ lookName } > Small </ uui-button >
49
- < uui-button .look =${ lookName } >
50
- Large other option
51
- </ uui-button > </ uui-button-group
52
- > < br /> < br /> < br /> `
41
+ html ` < div > ${ lookName } </ div >
42
+ < uui-button-group >
43
+ < uui-button .look =${ lookName } label ="Button 1"> </ uui-button >
44
+ < uui-button .look =${ lookName } label ="Button 2"> </ uui-button >
45
+ < uui-button .look =${ lookName } label ="Button 3"> </ uui-button >
46
+ < uui-button
47
+ .look =${ lookName }
48
+ label ="Button 4"> </ uui-button > </ uui-button-group
49
+ > < br /> < br /> `
53
50
) }
54
51
` ;
55
52
53
+ Looks . parameters = {
54
+ controls : { disable : true } ,
55
+ docs : {
56
+ source : {
57
+ code : `
58
+ <uui-button-group>
59
+ <uui-button look="[look]">Button 1</uui-button>
60
+ <uui-button look="[look]">Button 2</uui-button>
61
+ <uui-button look="[look]">Button 3</uui-button>
62
+ <uui-button look="[look]">Button 4</uui-button>
63
+ </uui-button-group>` ,
64
+ } ,
65
+ } ,
66
+ } ;
67
+
56
68
export const MixedLooks = ( ) =>
57
69
html `< uui-button-group >
58
- < uui-button look ="primary "> Hello</ uui-button >
59
- ${ buttons . map (
60
- el => html `< uui-button look ="secondary "> ${ el } </ uui-button > `
61
- ) } < uui-button look ="danger "> World</ uui-button > </ uui-button-group
62
- > ` ;
70
+ < uui-button look ="outline " label ="Button 1 "> </ uui-button >
71
+ < uui-button look ="outline " label ="Button 2 "> </ uui-button >
72
+ < uui-button look ="outline " label ="Button 3 "> </ uui-button >
73
+ < uui-button look ="danger " label ="Button 4 "> </ uui-button >
74
+ </ uui-button-group > ` ;
75
+
63
76
MixedLooks . parameters = {
77
+ controls : { disable : true } ,
64
78
docs : {
65
79
source : {
66
- code : html ` < uui-button-group >
67
- < uui-button look =" primary " > Hello </ uui-button >
68
- < uui-button > development </ uui-button >
69
- < uui-button > staging </ uui-button >
70
- < uui-button > live </ uui-button >
71
- < uui-button look ="danger "> World </ uui-button >
72
- </ uui-button-group > `. strings ,
80
+ code : `
81
+ <uui-button-group >
82
+ <uui-button look="outline">Button 1 </uui-button>
83
+ <uui-button look="outline">Button 2 </uui-button>
84
+ <uui-button look="outline">Button 3 </uui-button>
85
+ <uui-button look="danger">Button 4 </uui-button>
86
+ </uui-button-group>` ,
73
87
} ,
74
88
} ,
75
89
} ;
0 commit comments