Skip to content

Commit 2a72d10

Browse files
committed
[#43] ♻️ Update and optimize Storybook
1 parent 706f67e commit 2a72d10

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

src/stories/common/input/PasswordInput.stories.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { fn } from '@storybook/test'
33
import { PasswordInput } from '@/components/common/input/PasswordInput'
44

55
export default {
6-
title: 'Example/PasswordInput',
6+
title: 'Common/Input/PasswordInput',
77
component: PasswordInput,
88
parameters: {
9-
layout: 'fullscreen',
9+
layout: 'padded',
1010
},
1111
tags: ['input', 'password'],
1212
argTypes: {
@@ -21,13 +21,19 @@ export default {
2121
export const Default = {
2222
args: {
2323
placeholder: '비밀번호를 입력하세요.',
24-
fullWidth: true,
2524
},
2625
}
2726

2827
export const Error = {
2928
args: {
3029
error: true,
30+
},
31+
}
32+
33+
export const FullWidth = {
34+
args: {
35+
placeholder: '비밀번호를 입력하세요.',
3136
fullWidth: true,
3237
},
3338
}
39+

src/stories/common/input/TextInput.stories.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { TextInput } from '@/components/common/input/TextInput'
44

55
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
66
export default {
7-
title: 'Example/TextInput',
7+
title: 'Common/Input/TextInput',
88
component: TextInput,
99
parameters: {
1010
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
11-
layout: 'fullscreen',
11+
layout: 'padded',
1212
},
1313
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
1414
tags: ['common', 'input'],
@@ -24,18 +24,21 @@ export default {
2424
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
2525
export const Default = {
2626
args: {
27-
primary: true,
27+
placeholder: '텍스트를 입력하세요.',
28+
primary: true
2829
},
2930
}
3031

3132
export const Error = {
3233
args: {
33-
error: true,
34+
placeholder: '비밀번호를 입력하세요.',
35+
error: true
3436
},
3537
}
3638

3739
export const FullWidth = {
3840
args: {
39-
fullWidth: true,
41+
placeholder: '텍스트를 입력하세요.',
42+
fullWidth: true
4043
},
4144
}

0 commit comments

Comments
 (0)