@@ -9,21 +9,26 @@ export default {
9
9
args : {
10
10
name : 'John Rabbit' ,
11
11
} ,
12
+ decorators : [
13
+ ( Story : any ) => html `< div style ="width: 200px; "> ${ Story ( ) } </ div > ` ,
14
+ ] ,
12
15
} ;
13
16
17
+ const cardContent = html `
18
+ < div style ="margin-bottom: 12px "> Editors</ div >
19
+ < div > Has not logged in yet</ div >
20
+ ` ;
21
+
14
22
const Template : Story = props => html `
15
- < div style ="width: 200px ">
16
- < uui-card-user
17
- name =${ props . name }
18
- ?selectable =${ props . selectable }
19
- ?select-only=${ props . selectOnly }
20
- ?selected=${ props . selected }
21
- ?error=${ props . error }
22
- ?disabled=${ props . disabled } >
23
- < div style ="margin-bottom: 12px "> Editors</ div >
24
- < div > Has not logged in yet</ div >
25
- </ uui-card-user >
26
- </ div >
23
+ < uui-card-user
24
+ name =${ props . name }
25
+ ?selectable =${ props . selectable }
26
+ ?select-only=${ props . selectOnly }
27
+ ?selected=${ props . selected }
28
+ ?error=${ props . error }
29
+ ?disabled=${ props . disabled } >
30
+ ${ cardContent }
31
+ </ uui-card-user >
27
32
` ;
28
33
29
34
export const AAAOverview = Template . bind ( { } ) ;
@@ -47,7 +52,9 @@ Selectable.parameters = {
47
52
docs : {
48
53
source : {
49
54
code : `
50
- <uui-card-user name="John Rabbit" selectable></uui-card-user>` ,
55
+ <uui-card-user name="John Rabbit" selectable>
56
+ <!-- Content -->
57
+ </uui-card-user>` ,
51
58
} ,
52
59
} ,
53
60
} ;
@@ -59,11 +66,13 @@ SelectOnly.args = {
59
66
} ;
60
67
61
68
SelectOnly . parameters = {
62
- controls : { include : [ 'selectable' ] } ,
69
+ controls : { include : [ 'selectable, selectOnly ' ] } ,
63
70
docs : {
64
71
source : {
65
72
code : `
66
- <uui-card-user name="John Rabbit" selectable></uui-card-user>` ,
73
+ <uui-card-user name="John Rabbit" selectable select-only>
74
+ <!-- Content -->
75
+ </uui-card-user>` ,
67
76
} ,
68
77
} ,
69
78
} ;
@@ -78,7 +87,9 @@ Disabled.parameters = {
78
87
docs : {
79
88
source : {
80
89
code : `
81
- <uui-card-user name="John Rabbit" disabled></uui-card-user>` ,
90
+ <uui-card-user name="John Rabbit" disabled>
91
+ <!-- Content -->
92
+ </uui-card-user>` ,
82
93
} ,
83
94
} ,
84
95
} ;
@@ -93,50 +104,55 @@ Error.parameters = {
93
104
docs : {
94
105
source : {
95
106
code : `
96
- <uui-card-user name="John Rabbit" error></uui-card-user>` ,
107
+ <uui-card-user name="John Rabbit" error>
108
+ <!-- Content -->
109
+ </uui-card-user>` ,
97
110
} ,
98
111
} ,
99
112
} ;
100
113
101
114
export const Actions : Story = ( ) => html `
102
- < div style =" width: 200px ">
103
- < uui-card-user name =" John Rabbit ">
104
- < uui-action-bar slot =" actions " >
105
- < uui-button label =" Remove " > Remove < /uui-button >
106
- </ uui-action-bar >
107
- </ uui-card-user >
108
- </ div >
115
+ < uui-card-user name =" John Rabbit ">
116
+ < uui-action-bar slot =" actions ">
117
+ < uui-button label =" Remove " > Remove </ uui-button >
118
+ < /uui-action-bar >
119
+
120
+ ${ cardContent }
121
+ </ uui-card-user >
109
122
` ;
110
123
111
124
Actions . parameters = {
112
125
docs : {
113
126
source : {
114
127
code : `
115
- <uui-card-user
116
- name="John Rabbit">
117
- <uui-action-bar slot="actions">
118
- <uui-button label="Remove">Remove</uui-button>
119
- </uui-action-bar>
120
- </uui-card-user>` ,
128
+ <uui-card-user name="John Rabbit">
129
+ <uui-action-bar slot="actions">
130
+ <uui-button label="Remove">Remove</uui-button>
131
+ </uui-action-bar>
132
+
133
+ <!-- Content -->
134
+ </uui-card-user>` ,
121
135
} ,
122
136
} ,
123
137
} ;
124
138
125
139
export const Tags : Story = ( ) => html `
126
- < div style =" width: 200px ">
127
- < uui-card-user name =" John Rabbit " >
128
- < uui-tag slot =" tag " size =" s " look =" danger " > Disabled </ uui-tag >
129
- </ uui-card-user >
130
- </ div >
140
+ < uui-card-user name =" John Rabbit ">
141
+ < uui-tag slot =" tag " size =" s " look =" danger " > Disabled </ uui-tag >
142
+
143
+ ${ cardContent }
144
+ </ uui-card-user >
131
145
` ;
132
146
133
147
Tags . parameters = {
134
148
docs : {
135
149
source : {
136
150
code : `
137
- <uui-card-user name="John Rabbit">
138
- <uui-tag slot="tag" size="s" look="danger">Disabled</uui-tag>
139
- </uui-card-user>` ,
151
+ <uui-card-user name="John Rabbit">
152
+ <uui-tag slot="tag" size="s" look="danger">Disabled</uui-tag>
153
+
154
+ <!-- Content -->
155
+ </uui-card-user>` ,
140
156
} ,
141
157
} ,
142
158
} ;
0 commit comments