diff --git a/services/web/frontend/stories/select.stories.tsx b/services/web/frontend/stories/select.stories.tsx new file mode 100644 index 0000000000..6f83e67143 --- /dev/null +++ b/services/web/frontend/stories/select.stories.tsx @@ -0,0 +1,35 @@ +import { Select } from '../js/shared/components/select' + +const items = [1, 2, 3, 4].map(index => ({ + key: index, + value: `Demo item ${index}`, + group: index >= 3 ? 'Large numbers' : undefined, +})) + +export const Base = () => { + return ( + String(x?.value)} + itemToKey={x => String(x.key)} + itemToSubtitle={x => x?.group ?? ''} + defaultText="Choose an item" + /> + ) +} + +export default { + title: 'Shared / Components / Select', + component: Select, +} diff --git a/services/web/frontend/stories/switcher.stories.tsx b/services/web/frontend/stories/switcher.stories.tsx new file mode 100644 index 0000000000..c713aaf025 --- /dev/null +++ b/services/web/frontend/stories/switcher.stories.tsx @@ -0,0 +1,28 @@ +import { Switcher, SwitcherItem } from '../js/shared/components/switcher' + +export const Base = () => { + return ( + + + + + + + ) +} + +export const Disabled = () => { + return ( + + + + + + + ) +} + +export default { + title: 'Shared / Components / Switcher', + component: Switcher, +}