This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / web / src / lib / components / ui / Radio.stories.svelte
975 B 34 lines
1<script module lang="ts"> 2 import { defineMeta } from "@storybook/addon-svelte-csf"; 3 import Radio from "./Radio.svelte"; 4 5 const { Story } = defineMeta({ 6 title: "UI/Radio", 7 component: Radio, 8 tags: ["autodocs"], 9 argTypes: { 10 value: { control: "text" }, 11 group: { control: "text" }, 12 disabled: { control: "boolean" } 13 }, 14 args: { 15 value: "a", 16 group: "b", 17 disabled: false 18 } 19 }); 20</script> 21 22<!-- Radio content comes through its `children` snippet, provided here as Story slot content. --> 23<Story name="Default">Option</Story> 24<Story name="Checked" args={{ group: "a" }}>Option</Story> 25<Story name="Disabled" args={{ disabled: true }}>Option</Story> 26<Story name="Disabled checked" args={{ group: "a", disabled: true }}>Option</Story> 27 28<Story name="Group"> 29 <div class="flex items-center gap-4"> 30 <Radio value="a" group="a">Option</Radio> 31 <Radio value="b" group="a">Option</Radio> 32 <Radio value="c" group="a" disabled>Option</Radio> 33 </div> 34</Story>