Skip to content

Commit dbd0fd8

Browse files
[chore] addon-design 적용
1 parent 33449db commit dbd0fd8

3 files changed

Lines changed: 63 additions & 20 deletions

File tree

.storybook/main.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ function getAbsolutePath(value: string): any {
1212
const config: StorybookConfig = {
1313
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
1414
addons: [
15-
getAbsolutePath('@storybook/addon-onboarding'),
16-
getAbsolutePath('@storybook/addon-essentials'),
17-
getAbsolutePath('@chromatic-com/storybook'),
18-
getAbsolutePath('@storybook/addon-interactions'),
15+
'@storybook/addon-onboarding',
16+
'@storybook/addon-essentials',
17+
'@chromatic-com/storybook',
18+
'@storybook/addon-interactions',
19+
'@storybook/addon-designs',
1920
],
2021
framework: {
2122
name: getAbsolutePath('@storybook/nextjs'),

src/components/atoms/modal/Modal.stories.tsx

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ type Story = StoryObj<typeof Modal>;
1313
export const BasicModal: Story = {
1414
args: {
1515
children: (
16-
<div className='flex flex-col justify-center items-center w-[320px]'>
17-
<span className='text-white text-lg'>Title</span>
16+
<div className='flex w-[320px] flex-col items-center justify-center'>
17+
<span className='text-lg text-white'>Title</span>
1818

19-
<span className='text-gray-700 text-sm pt-3 pb-5'>Description</span>
19+
<span className='pb-5 pt-3 text-sm text-gray-700'>Description</span>
2020

2121
<div className='flex w-full justify-center gap-4'>
22-
<button className='w-[130px] h-[52px] rounded-md bg-gray-300 text-gray-800'>
22+
<button className='h-[52px] w-[130px] rounded-md bg-gray-300 text-gray-800'>
2323
Text
2424
</button>
25-
<button className='w-[130px] h-[52px] rounded-md bg-red-200 text-white'>
25+
<button className='h-[52px] w-[130px] rounded-md bg-red-200 text-white'>
2626
Text
2727
</button>
2828
</div>
@@ -31,20 +31,34 @@ export const BasicModal: Story = {
3131
},
3232
};
3333

34+
BasicModal.parameters = {
35+
design: {
36+
type: 'figma',
37+
url: 'https://www.figma.com/file/cr2DuY0vceiMI5LlqWdKR2/Wedvice_%EB%94%94%EC%9E%90%EC%9D%B8?node-id=1403-38040&t=st8bJ1H7LQ9alnmh-4',
38+
},
39+
};
40+
3441
export const ConfirmModal: Story = {
3542
args: {
3643
children: (
37-
<div className='flex flex-col justify-center w-[330px]'>
38-
<span className='text-white font-bold text-lg'>Title</span>
44+
<div className='flex w-[330px] flex-col justify-center'>
45+
<span className='text-lg font-bold text-white'>Title</span>
3946

40-
<span className='text-gray-700 text-sm pt-3 pb-5'>Description</span>
47+
<span className='pb-5 pt-3 text-sm text-gray-700'>Description</span>
4148

4249
<div className='flex w-full justify-end gap-4'>
43-
<button className='w-[56px] h-[34px] rounded-md bg-gray-300 text-gray-800'>
50+
<button className='h-[34px] w-[56px] rounded-md bg-gray-300 text-gray-800'>
4451
Text
4552
</button>
4653
</div>
4754
</div>
4855
),
4956
},
5057
};
58+
59+
ConfirmModal.parameters = {
60+
design: {
61+
type: 'figma',
62+
url: 'https://www.figma.com/design/cr2DuY0vceiMI5LlqWdKR2/Wedvice_%EB%94%94%EC%9E%90%EC%9D%B8?node-id=2294-24792&t=st8bJ1H7LQ9alnmh-4',
63+
},
64+
};

src/components/molecules/card/Card.stories.tsx

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,53 +23,74 @@ export const Default: Story = {
2323
<Card.Checkbox checked={args.checked} />
2424
<Card.TaskTitle>촬영 업체 선택 </Card.TaskTitle>
2525
<Card.CostSpan>400,000 원</Card.CostSpan>
26-
<Chip rounded="sm" size="sm">
26+
<Chip rounded='sm' size='sm'>
2727
2024.11.19
2828
</Chip>
29-
<Chip type="blue" rounded="sm" size="sm">
29+
<Chip type='blue' rounded='sm' size='sm'>
3030
예랑
3131
</Chip>
3232
</Card>
3333
);
3434
},
3535
};
3636

37+
Default.parameters = {
38+
design: {
39+
type: 'figma',
40+
url: 'https://www.figma.com/design/cr2DuY0vceiMI5LlqWdKR2/Wedvice_%EB%94%94%EC%9E%90%EC%9D%B8?node-id=1899-49502&t=st8bJ1H7LQ9alnmh-4',
41+
},
42+
};
43+
3744
// 가격 없는 카드
3845
export const NoPriceCard: Story = {
3946
render: (args) => {
4047
return (
4148
<Card checked={args.checked}>
4249
<Card.Checkbox checked={args.checked} />
4350
<Card.TaskTitle>촬영 업체 선택</Card.TaskTitle>
44-
<Chip rounded="sm" size="sm">
51+
<Chip rounded='sm' size='sm'>
4552
2024.11.19
4653
</Chip>
47-
<Chip type="blue" rounded="sm" size="sm">
54+
<Chip type='blue' rounded='sm' size='sm'>
4855
예랑
4956
</Chip>
5057
</Card>
5158
);
5259
},
5360
};
5461

62+
NoPriceCard.parameters = {
63+
design: {
64+
type: 'figma',
65+
url: 'https://www.figma.com/design/cr2DuY0vceiMI5LlqWdKR2/Wedvice_%EB%94%94%EC%9E%90%EC%9D%B8?node-id=1899-49504&t=st8bJ1H7LQ9alnmh-4',
66+
},
67+
};
68+
5569
// 체크 박스 없는 카드
5670
export const NoCheckboxCard: Story = {
5771
render: (args) => {
5872
return (
5973
<Card checked={args.checked}>
6074
<Card.TaskTitle>촬영 업체 선택</Card.TaskTitle>
6175
<Card.CostSpan>400,000 원</Card.CostSpan>
62-
<Chip rounded="sm" size="sm">
76+
<Chip rounded='sm' size='sm'>
6377
2024.11.19
6478
</Chip>
65-
<Chip type="blue" rounded="sm" size="sm">
79+
<Chip type='blue' rounded='sm' size='sm'>
6680
예랑
6781
</Chip>
6882
</Card>
6983
);
7084
},
7185
};
7286

87+
NoCheckboxCard.parameters = {
88+
design: {
89+
type: 'figma',
90+
url: 'https://www.figma.com/design/cr2DuY0vceiMI5LlqWdKR2/Wedvice_%EB%94%94%EC%9E%90%EC%9D%B8?node-id=1899-49526&t=st8bJ1H7LQ9alnmh-4',
91+
},
92+
};
93+
7394
// 체크 박스, 가격 없는 카드
7495
export const NoCheckboxAndNoCost: Story = {
7596
render: (args) => {
@@ -78,10 +99,17 @@ export const NoCheckboxAndNoCost: Story = {
7899
<Card.TaskTitle>
79100
촬영 업체 선택촬영 업체 선택촬영 업체 선택촬영 업체 선택촬영 업체 선택
80101
</Card.TaskTitle>
81-
<Chip type="blue" rounded="sm" size="sm">
102+
<Chip type='blue' rounded='sm' size='sm'>
82103
예랑
83104
</Chip>
84105
</Card>
85106
);
86107
},
87108
};
109+
110+
NoCheckboxAndNoCost.parameters = {
111+
design: {
112+
type: 'figma',
113+
url: 'https://www.figma.com/design/cr2DuY0vceiMI5LlqWdKR2/Wedvice_%EB%94%94%EC%9E%90%EC%9D%B8?node-id=1899-49633&t=st8bJ1H7LQ9alnmh-4',
114+
},
115+
};

0 commit comments

Comments
 (0)