Skip to content

Commit e5e2b4e

Browse files
jungcome7claude
andcommitted
chore: Storybook deploy comment in English
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 974d3c7 commit e5e2b4e

File tree

9 files changed

+240
-30
lines changed

9 files changed

+240
-30
lines changed

.github/workflows/deploy-storybook.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
with:
5959
issue-number: ${{ github.event.pull_request.number }}
6060
comment-author: "github-actions[bot]"
61-
body-includes: "Storybook 배포 완료"
61+
body-includes: "Storybook Deployed"
6262

6363
- name: Create or update deployment comment
6464
if: github.event_name == 'pull_request'
@@ -67,9 +67,9 @@ jobs:
6767
comment-id: ${{ steps.find-comment.outputs.comment-id }}
6868
issue-number: ${{ github.event.pull_request.number }}
6969
body: |
70-
## Storybook 배포 완료
70+
## Storybook Deployed
7171
72-
:link: **미리보기:** ${{ steps.deployment.outputs.page_url }}storybook/
72+
:link: **Preview:** ${{ steps.deployment.outputs.page_url }}storybook/
7373
7474
_Last updated: ${{ github.event.pull_request.updated_at }}_
7575
edit-mode: replace

packages/design-system/.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { StorybookConfig } from "@storybook/react-vite";
33
const config: StorybookConfig = {
44
framework: "@storybook/react-vite",
55
stories: ["../src/**/*.stories.@(ts|tsx)"],
6-
addons: ["@storybook/addon-themes"],
6+
addons: ["@storybook/addon-docs", "@storybook/addon-themes"],
77
};
88

99
export default config;

packages/design-system/.storybook/preview.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,31 @@ import { DSColor } from "../src/foundation/color";
66
const preview: Preview = {
77
parameters: {
88
layout: "fullscreen",
9+
options: {
10+
storySort: {
11+
order: [
12+
"Foundations",
13+
["Color", "Icon", "Typography", ["Docs", "Showcase", "Playground"]],
14+
"Components",
15+
],
16+
},
17+
},
918
},
1019
initialGlobals: {
1120
theme: "light",
1221
},
1322
decorators: [
1423
(Story, context) => {
1524
const theme = (context.globals["theme"] as "dark" | "light") || "light";
25+
const isDocs = context.viewMode === "docs";
1626
return (
1727
<DSThemeProvider defaultTheme={theme}>
1828
<div
1929
style={{
2030
backgroundColor: DSColor.background.surface.ground,
2131
color: DSColor.typography.primary,
22-
padding: 40,
23-
minHeight: "100vh",
32+
padding: isDocs ? 16 : 40,
33+
minHeight: isDocs ? undefined : "100vh",
2434
fontFamily: "Inter, sans-serif",
2535
}}
2636
>

packages/design-system/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"sync:tokens": "node scripts/sync-tokens/sync-all.mjs"
2424
},
2525
"devDependencies": {
26+
"@storybook/addon-docs": "^10.3.3",
2627
"@storybook/addon-themes": "^10.3.3",
2728
"@storybook/react": "^10.3.3",
2829
"@storybook/react-vite": "^10.3.3",
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import type { Meta, StoryObj } from "@storybook/react";
2+
3+
const font = "Inter, -apple-system, sans-serif";
4+
5+
const meta = {
6+
title: "Components/Overview",
7+
} satisfies Meta;
8+
9+
export default meta;
10+
11+
export const Overview: StoryObj = {
12+
name: "Overview",
13+
render: () => (
14+
<div
15+
style={{
16+
fontFamily: font,
17+
display: "flex",
18+
flexDirection: "column",
19+
gap: 8,
20+
}}
21+
>
22+
<h1
23+
style={{
24+
fontFamily: font,
25+
fontSize: 28,
26+
fontWeight: 600,
27+
margin: "0 0 8px",
28+
lineHeight: 1.4,
29+
}}
30+
>
31+
Components
32+
</h1>
33+
<p
34+
style={{
35+
fontFamily: font,
36+
fontSize: 16,
37+
opacity: 0.7,
38+
margin: 0,
39+
lineHeight: 1.6,
40+
}}
41+
>
42+
Components will be added here.
43+
</p>
44+
</div>
45+
),
46+
};

packages/design-system/src/foundation/color/color.stories.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function SemanticSwatch({ name, value }: { name: string; value: string }) {
214214
}
215215

216216
const meta = {
217-
title: "Color",
217+
title: "Foundations/Color",
218218
} satisfies Meta;
219219

220220
export default meta;
@@ -228,17 +228,16 @@ export const Color: StoryObj = {
228228
display: "flex",
229229
flexDirection: "column",
230230
gap: 40,
231-
maxWidth: 960,
232231
}}
233232
>
234233
<div>
235234
<h1
236235
style={{
237236
fontFamily: font,
238-
fontSize: 32,
237+
fontSize: 28,
239238
fontWeight: 600,
240239
color: DSColor.typography.primary,
241-
margin: "0 0 6px",
240+
margin: "0 0 8px",
242241
lineHeight: 1.4,
243242
}}
244243
>
@@ -247,8 +246,9 @@ export const Color: StoryObj = {
247246
<p
248247
style={{
249248
fontFamily: font,
250-
fontSize: 17,
249+
fontSize: 16,
251250
color: DSColor.typography.primary,
251+
opacity: 0.7,
252252
margin: 0,
253253
lineHeight: 1.6,
254254
}}
@@ -262,10 +262,10 @@ export const Color: StoryObj = {
262262
<h2
263263
style={{
264264
fontFamily: font,
265-
fontSize: 22,
265+
fontSize: 20,
266266
fontWeight: 600,
267267
color: DSColor.typography.primary,
268-
margin: 0,
268+
margin: "0 0 16px",
269269
}}
270270
>
271271
Primitives
@@ -275,7 +275,7 @@ export const Color: StoryObj = {
275275
<h3
276276
style={{
277277
fontFamily: font,
278-
fontSize: 15,
278+
fontSize: 14,
279279
fontWeight: 600,
280280
color: DSColor.typography.primary,
281281
textTransform: "uppercase" as const,
@@ -312,10 +312,10 @@ export const Color: StoryObj = {
312312
<h2
313313
style={{
314314
fontFamily: font,
315-
fontSize: 22,
315+
fontSize: 20,
316316
fontWeight: 600,
317317
color: DSColor.typography.primary,
318-
margin: 0,
318+
margin: "0 0 16px",
319319
}}
320320
>
321321
Semantic
@@ -325,7 +325,7 @@ export const Color: StoryObj = {
325325
<h3
326326
style={{
327327
fontFamily: font,
328-
fontSize: 15,
328+
fontSize: 14,
329329
fontWeight: 600,
330330
color: DSColor.typography.primary,
331331
textTransform: "uppercase" as const,

packages/design-system/src/foundation/icon/icon.stories.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const iconEntries = Object.entries(Icons).filter(
1010
) as Array<[string, React.FC<Icons.DSIconProps>]>;
1111

1212
const meta = {
13-
title: "Icon",
13+
title: "Foundations/Icon",
1414
} satisfies Meta;
1515

1616
export default meta;
@@ -29,20 +29,24 @@ export const Icon: StoryObj = {
2929
<div>
3030
<h1
3131
style={{
32-
fontSize: 32,
32+
fontFamily: font,
33+
fontSize: 28,
3334
fontWeight: 600,
3435
color: DSColor.typography.primary,
35-
margin: "0 0 6px",
36+
margin: "0 0 8px",
37+
lineHeight: 1.4,
3638
}}
3739
>
3840
Icon
3941
</h1>
4042
<p
4143
style={{
42-
fontSize: 17,
44+
fontFamily: font,
45+
fontSize: 16,
4346
color: DSColor.typography.primary,
4447
opacity: 0.7,
4548
margin: 0,
49+
lineHeight: 1.6,
4650
}}
4751
>
4852
{iconEntries.length} icons synced from Figma. All icons accept{" "}

packages/design-system/src/foundation/typography/typography.stories.tsx

Lines changed: 91 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
import React from "react";
12
import type { Meta, StoryObj } from "@storybook/react";
3+
import {
4+
Title,
5+
Description,
6+
Primary,
7+
Controls,
8+
} from "@storybook/addon-docs/blocks";
29
import { DSTypography } from "./typography";
310
import { DSColor } from "../color";
411
import { dsTypographyTokens } from "./typography-tokens";
@@ -126,13 +133,78 @@ function TokenRow({ sizeKey }: { sizeKey: DSTypographyTokensKey }) {
126133
}
127134

128135
const meta = {
129-
title: "Typography",
130-
} satisfies Meta;
136+
title: "Foundations/Typography",
137+
component: DSTypography,
138+
tags: ["autodocs"],
139+
parameters: {
140+
docs: {
141+
page: () => (
142+
<React.Fragment>
143+
<Title />
144+
<Description />
145+
<Primary />
146+
<h2 style={{ fontWeight: 600, marginTop: 32, marginBottom: 16 }}>
147+
Props
148+
</h2>
149+
<Controls />
150+
</React.Fragment>
151+
),
152+
},
153+
},
154+
argTypes: {
155+
size: {
156+
control: "select",
157+
options: Object.keys(dsTypographyTokens) as DSTypographyTokensKey[],
158+
description: "Typography size token",
159+
},
160+
weight: {
161+
control: "select",
162+
options: ["semibold", "medium", "regular"],
163+
description: "Font weight",
164+
},
165+
fontSize: {
166+
control: "number",
167+
description: "Override font size (px)",
168+
},
169+
color: {
170+
control: "color",
171+
description: "Text color — DSColor token or any CSS color",
172+
},
173+
as: {
174+
control: "select",
175+
options: ["span", "p", "h1", "h2", "h3", "h4", "div", "label"],
176+
description: "HTML element to render as",
177+
},
178+
},
179+
} satisfies Meta<typeof DSTypography>;
131180

132181
export default meta;
182+
type Story = StoryObj<typeof meta>;
183+
184+
/** @internal Docs preview — hidden from sidebar */
185+
export const _DocsPreview: Story = {
186+
tags: ["!dev"],
187+
parameters: {
188+
docs: {
189+
story: { inline: true },
190+
canvas: { withToolbar: false, sourceState: "shown" },
191+
source: {
192+
code: `<DSTypography size="textMd" weight="medium" color={DSColor.typography.primary}>
193+
The quick brown fox jumps over the lazy dog
194+
</DSTypography>`,
195+
},
196+
},
197+
},
198+
args: {
199+
size: "textMd",
200+
weight: "medium",
201+
color: DSColor.typography.primary,
202+
children: "The quick brown fox jumps over the lazy dog",
203+
},
204+
};
133205

134-
export const Typography: StoryObj = {
135-
name: "Typography",
206+
/** Full showcase of all typography tokens */
207+
export const Showcase: Story = {
136208
render: () => (
137209
<div
138210
style={{
@@ -146,10 +218,10 @@ export const Typography: StoryObj = {
146218
<h1
147219
style={{
148220
fontFamily: font,
149-
fontSize: 32,
221+
fontSize: 28,
150222
fontWeight: 600,
151223
color: DSColor.typography.primary,
152-
margin: "0 0 6px",
224+
margin: "0 0 8px",
153225
lineHeight: 1.4,
154226
}}
155227
>
@@ -158,7 +230,7 @@ export const Typography: StoryObj = {
158230
<p
159231
style={{
160232
fontFamily: font,
161-
fontSize: 17,
233+
fontSize: 16,
162234
color: DSColor.typography.primary,
163235
opacity: 0.7,
164236
margin: 0,
@@ -173,7 +245,7 @@ export const Typography: StoryObj = {
173245
<h2
174246
style={{
175247
fontFamily: font,
176-
fontSize: 22,
248+
fontSize: 20,
177249
fontWeight: 600,
178250
color: DSColor.typography.primary,
179251
margin: "0 0 8px",
@@ -198,7 +270,7 @@ export const Typography: StoryObj = {
198270
<h2
199271
style={{
200272
fontFamily: font,
201-
fontSize: 22,
273+
fontSize: 20,
202274
fontWeight: 600,
203275
color: DSColor.typography.primary,
204276
margin: "0 0 16px",
@@ -250,3 +322,13 @@ export const Typography: StoryObj = {
250322
</div>
251323
),
252324
};
325+
326+
/** Interactive playground — use Controls to change props */
327+
export const Playground: Story = {
328+
args: {
329+
size: "textMd",
330+
weight: "medium",
331+
color: DSColor.typography.primary,
332+
children: "The quick brown fox jumps over the lazy dog",
333+
},
334+
};

0 commit comments

Comments
 (0)