-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathButton.stories.tsx
More file actions
87 lines (80 loc) · 1.93 KB
/
Copy pathButton.stories.tsx
File metadata and controls
87 lines (80 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { Button } from '@shared/ui/Button/Button';
import type { Meta, StoryObj } from '@storybook/react-vite';
const meta = {
title: 'Shared/UI/Button',
component: Button,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
argTypes: {
variant: {
control: 'select',
options: ['fill', 'outline'],
description: 'Button variant style',
},
children: {
control: 'text',
description: 'Button text content',
},
disabled: {
control: 'boolean',
description: 'Disabled state',
},
},
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Fill: Story = {
args: {
variant: 'fill',
children: 'Button',
},
};
export const FillDisabled: Story = {
args: {
variant: 'fill',
children: 'Button',
disabled: true,
},
};
export const Outline: Story = {
args: {
variant: 'outline',
children: 'Button',
},
};
export const OutlineDisabled: Story = {
args: {
variant: 'outline',
children: 'Button',
disabled: true,
},
};
export const AllStates: Story = {
render: () => (
<div className="flex flex-col gap-6">
<div className="flex flex-col gap-2">
<span className="typo-caption-1">Fill Variant</span>
<div className="flex gap-4">
<Button variant="fill">Default</Button>
<Button variant="fill" disabled>
Disabled
</Button>
</div>
</div>
<div className="flex flex-col gap-2">
<span className="typo-caption-1">Outline Variant</span>
<div className="flex gap-4">
<Button variant="outline">Default</Button>
<Button variant="outline" disabled>
Disabled
</Button>
</div>
</div>
<p className="typo-caption-2 max-w-md text-gray-600">
Hover, Focus 상태 확인: 마우스 오버 또는 Tab 키 이동
</p>
</div>
),
};