File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ import { Meta , StoryObj } from '@storybook/react'
2+
3+ import { TextInput } from '@/components/common/input/TextInput'
4+ import { Label } from '@/components/common/label/Label'
5+ import { LabelProps } from '@/components/common/label/Label'
6+
7+ const meta : Meta < typeof Label > = {
8+ title : 'Common/Label/Label' ,
9+ component : Label ,
10+ parameters : {
11+ layout : 'centered' ,
12+ } ,
13+ args : {
14+ required : false ,
15+ labelText : '라벨 제목' ,
16+ } ,
17+ }
18+
19+ export default meta
20+
21+ type Story = StoryObj < typeof Label >
22+
23+ export const Default : Story = {
24+ args : {
25+ labelText : '이름' ,
26+ required : false ,
27+ } ,
28+ render : ( args : LabelProps ) => (
29+ < Label { ...args } >
30+ < TextInput placeholder = '이름을 입력하세요' />
31+ </ Label >
32+ ) ,
33+ }
34+
35+ export const RequiredLabel : Story = {
36+ args : {
37+ labelText : '이메일' ,
38+ required : true ,
39+ } ,
40+ render : ( args : LabelProps ) => (
41+ < Label { ...args } >
42+ < TextInput placeholder = '이메일을 입력하세요' />
43+ </ Label >
44+ ) ,
45+ }
You can’t perform that action at this time.
0 commit comments