Skip to content

Commit f86aae0

Browse files
add a Story without value
1 parent 584c148 commit f86aae0

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

0 commit comments

Comments
 (0)