Skip to content

Commit f6b107f

Browse files
add a Story without value
1 parent 174e7f4 commit f6b107f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

stories/Picklist.stories.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,36 @@ export const WithDividers: StoryObj<StoryProps> = {
380380
},
381381
},
382382
};
383+
384+
/**
385+
*
386+
*/
387+
export const WithoutValue: StoryObj<StoryProps> = {
388+
name: 'Without Value',
389+
render: ({ picklistItem1_onClick, picklistItem2_onClick, ...args }) => (
390+
<Picklist {...args}>
391+
<PicklistItem
392+
key='1'
393+
label='Picklist Item One (No Value)'
394+
onClick={picklistItem1_onClick}
395+
/>
396+
<PicklistItem
397+
key='2'
398+
label='Picklist Item Two (No Value)'
399+
onClick={picklistItem2_onClick}
400+
/>
401+
</Picklist>
402+
),
403+
args: {
404+
label: 'Picklist Label',
405+
defaultOpened: true,
406+
},
407+
parameters: {
408+
docs: {
409+
description: {
410+
story:
411+
'Picklist with no value specified. Initially, no item should be focused. Then, on clicking an item, at least `onClick()` of it should be triggered.',
412+
},
413+
},
414+
},
415+
};

0 commit comments

Comments
 (0)