@@ -90,16 +90,14 @@ export const WithInteractiveItems = () => {
90
90
const onClick = action ( 'onClick (ContainedListItem)' ) ;
91
91
92
92
return (
93
- < VStack gap = { 12 } >
94
- < ContainedList label = "List title" kind = "on-page" >
95
- < ContainedListItem onClick = { onClick } > List item</ ContainedListItem >
96
- < ContainedListItem onClick = { onClick } disabled >
97
- List item
98
- </ ContainedListItem >
99
- < ContainedListItem onClick = { onClick } > List item</ ContainedListItem >
100
- < ContainedListItem onClick = { onClick } > List item</ ContainedListItem >
101
- </ ContainedList >
102
- </ VStack >
93
+ < ContainedList label = "List title" kind = "on-page" >
94
+ < ContainedListItem onClick = { onClick } > List item</ ContainedListItem >
95
+ < ContainedListItem onClick = { onClick } disabled >
96
+ List item
97
+ </ ContainedListItem >
98
+ < ContainedListItem onClick = { onClick } > List item</ ContainedListItem >
99
+ < ContainedListItem onClick = { onClick } > List item</ ContainedListItem >
100
+ </ ContainedList >
103
101
) ;
104
102
} ;
105
103
@@ -114,19 +112,17 @@ export const WithActions = () => {
114
112
) ;
115
113
116
114
return (
117
- < VStack gap = { 12 } >
118
- < ContainedList
119
- label = "List title"
120
- kind = "on-page"
121
- action = { < ExpandableSearch placeholder = "Find item" size = "lg" /> } >
122
- < ContainedListItem action = { itemAction } > List item</ ContainedListItem >
123
- < ContainedListItem action = { itemAction } disabled >
124
- List item
125
- </ ContainedListItem >
126
- < ContainedListItem action = { itemAction } > List item</ ContainedListItem >
127
- < ContainedListItem action = { itemAction } > List item</ ContainedListItem >
128
- </ ContainedList >
129
- </ VStack >
115
+ < ContainedList
116
+ label = "List title"
117
+ kind = "on-page"
118
+ action = { < ExpandableSearch placeholder = "Find item" size = "lg" /> } >
119
+ < ContainedListItem action = { itemAction } > List item</ ContainedListItem >
120
+ < ContainedListItem action = { itemAction } disabled >
121
+ List item
122
+ </ ContainedListItem >
123
+ < ContainedListItem action = { itemAction } > List item</ ContainedListItem >
124
+ < ContainedListItem action = { itemAction } > List item</ ContainedListItem >
125
+ </ ContainedList >
130
126
) ;
131
127
} ;
132
128
@@ -142,89 +138,81 @@ export const WithInteractiveItemsAndActions = () => {
142
138
) ;
143
139
144
140
return (
145
- < VStack gap = { 12 } >
146
- < ContainedList
147
- label = "List title"
148
- kind = "on-page"
149
- action = { < ExpandableSearch placeholder = "Find item" size = "lg" /> } >
150
- < ContainedListItem action = { itemAction } onClick = { onClick } >
151
- List item
152
- </ ContainedListItem >
153
- < ContainedListItem action = { itemAction } onClick = { onClick } >
154
- List item
155
- </ ContainedListItem >
156
- < ContainedListItem action = { itemAction } onClick = { onClick } >
157
- List item
158
- </ ContainedListItem >
159
- < ContainedListItem action = { itemAction } onClick = { onClick } >
160
- List item
161
- </ ContainedListItem >
162
- </ ContainedList >
163
- </ VStack >
141
+ < ContainedList
142
+ label = "List title"
143
+ kind = "on-page"
144
+ action = { < ExpandableSearch placeholder = "Find item" size = "lg" /> } >
145
+ < ContainedListItem action = { itemAction } onClick = { onClick } >
146
+ List item
147
+ </ ContainedListItem >
148
+ < ContainedListItem action = { itemAction } onClick = { onClick } >
149
+ List item
150
+ </ ContainedListItem >
151
+ < ContainedListItem action = { itemAction } onClick = { onClick } >
152
+ List item
153
+ </ ContainedListItem >
154
+ < ContainedListItem action = { itemAction } onClick = { onClick } >
155
+ List item
156
+ </ ContainedListItem >
157
+ </ ContainedList >
164
158
) ;
165
159
} ;
166
160
167
161
export const WithListTitleDecorators = ( ) => {
168
162
return (
169
- < VStack gap = { 12 } >
170
- < ContainedList
171
- label = {
172
- < div
173
- style = { {
174
- display : 'flex' ,
175
- alignItems : 'center' ,
176
- justifyContent : 'space-between' ,
177
- } } >
178
- < span > List title</ span >
179
- < Tag size = "sm" > 4</ Tag >
180
- </ div >
181
- }
182
- kind = "on-page" >
183
- < ContainedListItem > List item</ ContainedListItem >
184
- < ContainedListItem > List item</ ContainedListItem >
185
- < ContainedListItem > List item</ ContainedListItem >
186
- < ContainedListItem > List item</ ContainedListItem >
187
- </ ContainedList >
188
- </ VStack >
163
+ < ContainedList
164
+ label = {
165
+ < div
166
+ style = { {
167
+ display : 'flex' ,
168
+ alignItems : 'center' ,
169
+ justifyContent : 'space-between' ,
170
+ } } >
171
+ < span > List title</ span >
172
+ < Tag size = "sm" > 4</ Tag >
173
+ </ div >
174
+ }
175
+ kind = "on-page" >
176
+ < ContainedListItem > List item</ ContainedListItem >
177
+ < ContainedListItem > List item</ ContainedListItem >
178
+ < ContainedListItem > List item</ ContainedListItem >
179
+ < ContainedListItem > List item</ ContainedListItem >
180
+ </ ContainedList >
189
181
) ;
190
182
} ;
191
183
192
184
export const WithIcons = ( ) => {
193
185
return (
194
- < VStack gap = { 12 } >
195
- < ContainedList label = "List title" kind = "on-page" >
196
- < ContainedListItem renderIcon = { Apple } > List item</ ContainedListItem >
197
- < ContainedListItem renderIcon = { Wheat } > List item</ ContainedListItem >
198
- < ContainedListItem renderIcon = { Strawberry } > List item</ ContainedListItem >
199
- < ContainedListItem renderIcon = { Fish } > List item</ ContainedListItem >
200
- </ ContainedList >
201
- </ VStack >
186
+ < ContainedList label = "List title" kind = "on-page" >
187
+ < ContainedListItem renderIcon = { Apple } > List item</ ContainedListItem >
188
+ < ContainedListItem renderIcon = { Wheat } > List item</ ContainedListItem >
189
+ < ContainedListItem renderIcon = { Strawberry } > List item</ ContainedListItem >
190
+ < ContainedListItem renderIcon = { Fish } > List item</ ContainedListItem >
191
+ </ ContainedList >
202
192
) ;
203
193
} ;
204
194
205
195
export const WithLayer = ( ) => {
206
196
return (
207
- < VStack gap = { 12 } >
208
- < VStack gap = { 5 } >
209
- < ContainedList label = "List title" kind = "on-page" >
210
- < ContainedListItem > List item</ ContainedListItem >
211
- < ContainedListItem > List item</ ContainedListItem >
212
- </ ContainedList >
213
- < Layer >
214
- < VStack gap = { 5 } >
197
+ < VStack gap = { 5 } >
198
+ < ContainedList label = "List title" kind = "on-page" >
199
+ < ContainedListItem > List item</ ContainedListItem >
200
+ < ContainedListItem > List item</ ContainedListItem >
201
+ </ ContainedList >
202
+ < Layer >
203
+ < VStack gap = { 5 } >
204
+ < ContainedList label = "List title" kind = "on-page" >
205
+ < ContainedListItem > List item</ ContainedListItem >
206
+ < ContainedListItem > List item</ ContainedListItem >
207
+ </ ContainedList >
208
+ < Layer >
215
209
< ContainedList label = "List title" kind = "on-page" >
216
210
< ContainedListItem > List item</ ContainedListItem >
217
211
< ContainedListItem > List item</ ContainedListItem >
218
212
</ ContainedList >
219
- < Layer >
220
- < ContainedList label = "List title" kind = "on-page" >
221
- < ContainedListItem > List item</ ContainedListItem >
222
- < ContainedListItem > List item</ ContainedListItem >
223
- </ ContainedList >
224
- </ Layer >
225
- </ VStack >
226
- </ Layer >
227
- </ VStack >
213
+ </ Layer >
214
+ </ VStack >
215
+ </ Layer >
228
216
</ VStack >
229
217
) ;
230
218
} ;
@@ -250,4 +238,7 @@ Playground.argTypes = {
250
238
kind : {
251
239
defaultValue : 'on-page' ,
252
240
} ,
241
+ size : {
242
+ defaultValue : 'lg' ,
243
+ } ,
253
244
} ;
0 commit comments