-
Notifications
You must be signed in to change notification settings - Fork 0
[CHORE] timo-design-system 컴포넌트 제너레이터 경로 수정 및 샘플 Button 제거 #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
25b84ff
e01e3ae
0d9990b
023cafb
b4ff179
a7427fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
|
|
||
| import { Color } from "./Color"; | ||
| import { COLOR_TOKENS } from "../../tokens/colort-token"; | ||
|
|
||
| import type { Meta, StoryObj } from "@storybook/react"; | ||
|
|
||
| const meta = { | ||
| title: "Tokens/Color", | ||
| parameters: { | ||
| layout: "padded", | ||
| }, | ||
| } satisfies Meta; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
|
|
||
| export const All: Story = { | ||
| name: "All Colors", | ||
| render: () => ( | ||
| <div style={{ fontFamily: "sans-serif", maxWidth: "600px" }}> | ||
| <p style={{ fontSize: "12px", color: "#999", marginBottom: "16px" }}> | ||
| ⚠️ 피그마 MCP 연동 후 실제 값으로 업데이트 예정입니다. | ||
| </p> | ||
| {COLOR_TOKENS.map((token) => ( | ||
| <Color key={token.name} {...token} /> | ||
| ))} | ||
| </div> | ||
|
kimminna marked this conversation as resolved.
|
||
| ), | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import { ColorToken } from "../../tokens/colort-token"; | ||
|
|
||
| export const Color = ({ name, cssVar, value, usage }: ColorToken) => { | ||
|
kimminna marked this conversation as resolved.
|
||
| return ( | ||
| <div | ||
| style={{ | ||
| display: "flex", | ||
| alignItems: "center", | ||
| gap: "16px", | ||
| padding: "12px 0", | ||
| borderBottom: "1px solid #f0f0f0", | ||
| }} | ||
| > | ||
| <div | ||
| style={{ | ||
| width: "48px", | ||
| height: "48px", | ||
| borderRadius: "8px", | ||
| backgroundColor: value, | ||
| border: "1px solid #e0e0e0", | ||
| flexShrink: 0, | ||
| }} | ||
| /> | ||
| <div> | ||
| <div style={{ fontWeight: 600, fontSize: "14px" }}>{name}</div> | ||
| <div | ||
| style={{ fontSize: "12px", color: "#666", fontFamily: "monospace" }} | ||
| > | ||
| {cssVar} | ||
| </div> | ||
| <div | ||
| style={{ fontSize: "12px", color: "#666", fontFamily: "monospace" }} | ||
| > | ||
| {value} | ||
| </div> | ||
| <div style={{ fontSize: "12px", color: "#888", marginTop: "2px" }}> | ||
| {usage} | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
kimminna marked this conversation as resolved.
|
||
| ); | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
|
|
||
| import { Typography } from "./Typography"; | ||
| import { TYPOGRAPHY_TOKENS } from "../../tokens/typography-token"; | ||
|
Comment on lines
+2
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win 스토리 import 경로를 절대 경로로 통일해 주세요. 스토리도 컴포넌트와 같은 규칙을 따라야 이후 생성기 출력과 Storybook alias가 자연스럽게 맞습니다. 상대 경로는 여기서 끊는 편이 좋습니다. As per path instructions, 🤖 Prompt for AI AgentsSource: Path instructions |
||
|
|
||
| import type { Meta, StoryObj } from "@storybook/react"; | ||
|
|
||
| const meta = { | ||
| title: "Tokens/Typography", | ||
| parameters: { | ||
| layout: "padded", | ||
| }, | ||
| } satisfies Meta; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
|
|
||
| export const Scale: Story = { | ||
| render: () => ( | ||
| <div style={{ fontFamily: "sans-serif", maxWidth: "700px" }}> | ||
| <p style={{ fontSize: "12px", color: "#999", marginBottom: "24px" }}> | ||
| ⚠️ 피그마 MCP 연동 후 실제 값으로 업데이트 예정입니다. | ||
| </p> | ||
| {TYPOGRAPHY_TOKENS.map((row) => ( | ||
| <Typography key={row.token} {...row} /> | ||
| ))} | ||
| </div> | ||
| ), | ||
|
kimminna marked this conversation as resolved.
|
||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import { TypographyToken } from "../../tokens/typography-token"; | ||
|
|
||
| export const Typography = ({ token, size, weight, usage }: TypographyToken) => { | ||
|
kimminna marked this conversation as resolved.
|
||
| return ( | ||
| <div | ||
| style={{ | ||
| display: "flex", | ||
| alignItems: "baseline", | ||
| gap: "24px", | ||
| padding: "16px 0", | ||
| borderBottom: "1px solid #f0f0f0", | ||
| }} | ||
| > | ||
| <div | ||
| style={{ | ||
| fontSize: size, | ||
| fontWeight: weight, | ||
| minWidth: "200px", | ||
| color: "#171717", | ||
| }} | ||
| > | ||
| 가나다라마 Aa | ||
| </div> | ||
| <div> | ||
| <div | ||
| style={{ fontSize: "12px", color: "#666", fontFamily: "monospace" }} | ||
| > | ||
| {token} | ||
| </div> | ||
| <div style={{ fontSize: "12px", color: "#888" }}> | ||
| {size} / {weight} — {usage} | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
kimminna marked this conversation as resolved.
|
||
| ); | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| export interface ColorToken { | ||
| name: string; | ||
| cssVar: string; | ||
| value: string; | ||
| usage: string; | ||
| } | ||
|
|
||
| export const COLOR_TOKENS: ColorToken[] = [ | ||
| { | ||
| name: "primary", | ||
| cssVar: "--color-primary", | ||
| value: "#111111", | ||
| usage: "브랜드 메인 (버튼, 강조)", | ||
| }, | ||
| { | ||
| name: "background", | ||
| cssVar: "--color-background", | ||
| value: "#ffffff", | ||
| usage: "페이지 배경", | ||
| }, | ||
| { | ||
| name: "foreground", | ||
| cssVar: "--color-foreground", | ||
| value: "#171717", | ||
| usage: "텍스트 기본", | ||
| }, | ||
| ]; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| export interface TypographyToken { | ||
| token: string; | ||
| size: string; | ||
| weight: string; | ||
| usage: string; | ||
| } | ||
|
|
||
| export const TYPOGRAPHY_TOKENS: TypographyToken[] = [ | ||
| { token: "text-2xl", size: "24px", weight: "700", usage: "페이지 제목" }, | ||
| { token: "text-xl", size: "20px", weight: "600", usage: "섹션 제목" }, | ||
| { token: "text-lg", size: "18px", weight: "500", usage: "카드 제목" }, | ||
| { token: "text-base", size: "16px", weight: "400", usage: "본문 기본" }, | ||
| { token: "text-sm", size: "14px", weight: "400", usage: "보조 텍스트" }, | ||
| { token: "text-xs", size: "12px", weight: "400", usage: "캡션·레이블" }, | ||
| ]; |
Uh oh!
There was an error while loading. Please reload this page.