import { StoryObj, Meta } from "@storybook/react"; import { MultiSelectItemChildren, MultiSelectionArgTypes } from "@sb/helpers"; import { fn } from "@storybook/test"; import { getCssProps } from "@sb/cssprops"; import { ListBox } from "."; import { Section, Item } from "@components/Collection"; const meta: Meta = { title: "Dropdowns/Selection/ListBox", component: ListBox, parameters: { cssprops: getCssProps("Listbox"), }, argTypes: { ...MultiSelectionArgTypes, children: { control: false, }, }, }; export default meta; type Story = StoryObj; export const Primary: Story = { args: { selectionMode: "single", defaultSelectedKeys: ["news"], selectionBehavior: "toggle", children: MultiSelectItemChildren, onSelectionChange: fn(), }, }; export const MultipleSelection: Story = { args: { ...Primary.args, selectionMode: "multiple", defaultSelectedKeys: ["news", "gaming"], }, }; export const WithSections: Story = { args: { ...Primary.args, children: [ ...MultiSelectItemChildren,
Option 4 Option 5
, ], }, };