Files
web/packages/design-system/lib/components/Select/Select.stories.tsx
Joakim Jäderberg 1bd6ce81b8 Merged in feature/SW-3245-move-jsontohtml (pull request #2661)
Feature/SW-3245 move jsontohtml

* wip

* Move JsonToHtml -> design-system

* Fix semantic issues within Stories

* replace imports of 'storybook/react-vite' with 'storybook/nextjs-vite'

* merge


Approved-by: Anton Gunnarsson
2025-08-18 07:46:21 +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: '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',
},
}