Files
web/packages/design-system/lib/components/Select/Select.stories.tsx
Rasmus Langvad ca6cc5ab6c Merged in feat/SW-3636-storybook-structure (pull request #3309)
feat(SW-3636): Storybook structure

* New sections in Storybook sidebar

* Group Storybook content files and add token files for spacing, border radius and shadows


Approved-by: Joakim Jäderberg
2025-12-08 12:35:14 +00:00

66 lines
1.1 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { Select } from './Select'
const meta: Meta<typeof Select> = {
title: 'Core Components/Select',
component: Select,
argTypes: {},
}
export default meta
type Story = StoryObj<typeof Select>
const items = [
{ label: 'Foo', value: 'foo' },
{ label: 'Bar', value: 'bar' },
{ label: 'Baz', value: 'baz' },
]
export const Default: Story = {
args: {
items,
label: 'Select an item',
name: 'foo',
},
}
export const DefaultSelected: Story = {
args: {
items,
label: 'Select an item',
name: 'foo',
defaultSelectedKey: 'foo',
},
}
export const Icons: Story = {
args: {
items,
label: 'Select an item',
name: 'foo',
icon: 'star',
itemIcon: 'check',
},
}
export const Filtering: Story = {
args: {
items,
label: 'Select an item',
name: 'foo',
enableFiltering: true,
},
}
export const FilteringSelected: Story = {
args: {
items,
label: 'Select an item',
name: 'foo',
enableFiltering: true,
defaultSelectedKey: 'foo',
},
}