|
1
|
import type { Meta, StoryObj } from "@storybook/react" |
|
2
|
|
|
3
|
import { Switch } from "./switch" |
|
4
|
|
|
5
|
const meta: Meta<typeof Switch> = { |
|
6
|
title: "Components/Switch", |
|
7
|
component: Switch, |
|
8
|
parameters: { |
|
9
|
layout: "centered", |
|
10
|
}, |
|
11
|
} |
|
12
|
|
|
13
|
export default meta |
|
14
|
|
|
15
|
type Story = StoryObj<typeof Switch> |
|
16
|
|
|
17
|
export const Default: Story = { |
|
18
|
args: {}, |
|
19
|
} |
|
20
|
|
|
21
|
export const Small: Story = { |
|
22
|
args: { |
|
23
|
size: "small", |
|
24
|
}, |
|
25
|
} |
|
26
|
|
|
27
|
export const Checked: Story = { |
|
28
|
args: { |
|
29
|
checked: true, |
|
30
|
}, |
|
31
|
} |
|
32
|
|
|
33
|
export const Disabled: Story = { |
|
34
|
args: { |
|
35
|
disabled: true, |
|
36
|
}, |
|
37
|
} |
|
38
|
|
|
39
|
export const CheckedDisabled: Story = { |
|
40
|
args: { |
|
41
|
checked: true, |
|
42
|
disabled: true, |
|
43
|
}, |
|
44
|
} |