1
1
import { ComponentStory , ComponentMeta } from '@storybook/react' ;
2
2
import React from 'react' ;
3
- import { Rhythm } from 'components/Rhythm/Rhythm' ;
3
+ import { PhorkIcon } from 'icons/PhorkIcon' ;
4
+ import { Flex } from 'components/Flex' ;
5
+ import { Rhythm } from 'components/Rhythm' ;
6
+ import { Typography } from 'components/Typography' ;
4
7
import { Accordion , AccordionProps } from '../Accordion' ;
5
8
import { items } from './helpers/items' ;
6
9
import AccordionDocumentation from './Accordion.docs.mdx' ;
@@ -9,6 +12,11 @@ export default {
9
12
title : 'Surfaces/Accordion' ,
10
13
component : Accordion ,
11
14
argTypes : {
15
+ flush : {
16
+ table : {
17
+ category : 'Appearance' ,
18
+ } ,
19
+ } ,
12
20
orientation : {
13
21
table : {
14
22
category : 'Appearance' ,
@@ -128,6 +136,7 @@ const Template: ComponentStory<typeof Accordion> = args => <Accordion {...args}
128
136
129
137
const defaultArgs = {
130
138
contrast : false ,
139
+ flush : false ,
131
140
items,
132
141
orientation : 'vertical' as AccordionProps [ 'orientation' ] ,
133
142
unstyled : false ,
@@ -213,6 +222,64 @@ AllowUnselect.args = {
213
222
minSelect : 0 ,
214
223
} ;
215
224
225
+ export const IconsOnly = Template . bind ( { } ) ;
226
+ IconsOnly . storyName = 'Icons only' ;
227
+ IconsOnly . args = {
228
+ ...defaultArgs ,
229
+ items : [
230
+ {
231
+ id : 'first' ,
232
+ iconOnly : true ,
233
+ label : < PhorkIcon scale = "medium" /> ,
234
+ content : (
235
+ < Rhythm ml = { 2 } >
236
+ < Flex full alignItems = "center" >
237
+ < Typography variants = "no-wrap" > First panel</ Typography >
238
+ </ Flex >
239
+ </ Rhythm >
240
+ ) ,
241
+ } ,
242
+ {
243
+ id : 'second' ,
244
+ iconOnly : true ,
245
+ label : < PhorkIcon scale = "medium" /> ,
246
+ content : (
247
+ < Rhythm ml = { 2 } >
248
+ < Flex full alignItems = "center" >
249
+ < Typography variants = "no-wrap" > Second panel</ Typography >
250
+ </ Flex >
251
+ </ Rhythm >
252
+ ) ,
253
+ } ,
254
+ {
255
+ id : 'third' ,
256
+ iconOnly : true ,
257
+ label : < PhorkIcon scale = "medium" /> ,
258
+ content : (
259
+ < Rhythm ml = { 2 } >
260
+ < Flex full alignItems = "center" >
261
+ < Typography variants = "no-wrap" > Third panel</ Typography >
262
+ </ Flex >
263
+ </ Rhythm >
264
+ ) ,
265
+ disabled : true ,
266
+ } ,
267
+ {
268
+ id : 'fourth' ,
269
+ iconOnly : true ,
270
+ label : < PhorkIcon scale = "medium" /> ,
271
+ content : (
272
+ < Rhythm ml = { 2 } >
273
+ < Flex full alignItems = "center" >
274
+ < Typography variants = "no-wrap" > Fourth panel</ Typography >
275
+ </ Flex >
276
+ </ Rhythm >
277
+ ) ,
278
+ } ,
279
+ ] ,
280
+ orientation : 'horizontal' ,
281
+ } ;
282
+
216
283
export const ItemFunctions = Template . bind ( { } ) ;
217
284
ItemFunctions . storyName = 'Item functions' ;
218
285
ItemFunctions . args = {
0 commit comments