import React, { useState } from 'react' import { type Meta, type StoryObj } from '@storybook/react' import { fn } from '@storybook/test' import { MultiSelectOptions, type MultiSelectOptionsProps } from '../index' const meta = { title: 'Components/MultiSelect/MultiSelectOptions', component: MultiSelectOptions, args: { id: 'id--multi-select-options', selectedValues: new Set(['pancakes']), options: [ { label: 'Pancakes', value: 'pancakes', }, { label: 'Waffle', value: 'waffle', }, { label: 'Toastie', value: 'toastie', }, ], onChange: fn(), }, } satisfies Meta export default meta type Story = StoryObj const MultiSelectOptionsTemplate: Story = { render: (args) => { const [selectedValues, setSelectedValues] = useState( args.selectedValues, ) return ( ) }, } export const Playground: Story = { ...MultiSelectOptionsTemplate, args: { id: 'id--jaffle', }, parameters: { docs: { canvas: { sourceState: 'shown', }, }, }, }