-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] Tag, PriorityIcon 컴포넌트 추가 및 Storybook 커스터마이징 #49
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
Merged
kimminna
merged 20 commits into
develop
from
feat/ui/48-tag-priority-icon-storybook-setup
Jul 1, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
113ad6a
chore(ui): timo-design-system 의존성 추가 (#48)
kimminna 29312b3
feat(ui): Storybook 커스텀 테마 및 매니저 설정 추가 (#48)
kimminna a690406
feat(ui): Tag, PriorityIcon 컴포넌트 추가 (#48)
kimminna fc5c852
feat(ui): 타이포그래피 토큰 신규 항목 추가 (#48)
kimminna 659b550
feat(root): Plop 컴포넌트 제너레이터에 스토리 템플릿 추가 (#48)
kimminna f666709
fix(ci): Chromatic 프리뷰 링크 출력 오류 수정 (#48)
kimminna 7a5c6b8
feat(ui): 타이포그래피 토큰 스토리에 누락 항목 추가 (#48)
kimminna bb9f4fb
fix(ui): Storybook 데코레이터 Story 타입 어노테이션 제거 (#48)
kimminna 7fc87d0
feat(ui): timo-blue-65 색상 토큰 추가 (#48)
kimminna c03e4c5
feat(ui): timo-gray 색상 토큰 추가 (#48)
kimminna 543e408
feat(ui): Tag 컴포넌트를 text prop 기반으로 수정하고 스토리 추가 (#48)
kimminna 3d6ef63
fix(ui): Tag 컴포넌트 내부 고정된 width 속성 제거 및 px 속성 추가 (#48)
kimminna bbc9db2
fix(ui): PriorityIcon priority prop 기본값 제거 (#48)
kimminna b51ed96
feat(ui): timo-gray-200 색상 토큰 추가 (#48)
kimminna c36628d
Merge branch 'develop' of https://github.com/Team-Timo/Timo-client in…
kimminna ff79f01
feat(ui): headline-b-40 타이포그래피 토큰 추가 (#48)
kimminna 0e0fe8c
fix(ci): Chromatic buildScriptName 옵션 추가 (#48)
kimminna 8e60a24
feat(design-system): PriorityIcon white·blue 타입 및 스토리 개선 (#48)
kimminna d8b48f4
feat(design-system): Tag blue 베리언트 추가 및 스토리 반영 (#48)
kimminna 593863b
chore: coderabbit 설정 공백 정리
kimminna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
|
|
||
| language: "ko-KR" | ||
| early_access: false | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,23 @@ | ||
| @theme { | ||
| --color-timo-blue-50: #F1F6FE; | ||
| --color-timo-blue-75: #C6D8FC; | ||
| --color-timo-blue-100: #AEC8FB; | ||
| --color-timo-blue-200: #8CB0F9; | ||
| --color-timo-blue-300: #74A0F8; | ||
| --color-timo-blue-50: #f1f6fe; | ||
| --color-timo-blue-65: #dee9ff; | ||
| --color-timo-blue-75: #c6d8fc; | ||
| --color-timo-blue-100: #aec8fb; | ||
| --color-timo-blue-200: #8cb0f9; | ||
| --color-timo-blue-300: #74a0f8; | ||
|
|
||
| --color-timo-gray-300: #F5F5F5; | ||
| --color-timo-gray-500: #E6E8E8; | ||
| --color-timo-gray-600: #D8D8D8; | ||
| --color-timo-gray-700: #9F9F9F; | ||
| --color-timo-gray-800: #757575; | ||
| --color-timo-gray-900: #3F3F3F; | ||
| --color-timo-gray-200: #fbfbfb; | ||
| --color-timo-gray-300: #f5f5f5; | ||
| --color-timo-gray-500: #e6e8e8; | ||
| --color-timo-gray-600: #d8d8d8; | ||
| --color-timo-gray-700: #9f9f9f; | ||
| --color-timo-gray-800: #757575; | ||
| --color-timo-gray-900: #3f3f3f; | ||
|
|
||
| --color-timo-yellow-300: #F2FC9F; | ||
| --color-timo-black: #121212; | ||
| --color-timo-red: #FF6650; | ||
| --color-timo-orange: #FFB157; | ||
| --color-timo-green: #9FDDA9; | ||
| } | ||
| --color-timo-yellow-300: #f2fc9f; | ||
|
|
||
| --color-timo-black: #121212; | ||
| --color-timo-red: #ff6650; | ||
| --color-timo-orange: #ffb157; | ||
| --color-timo-gray: #bebebe; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Contributor
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. js말고 css로 텍스트를 추가하는 방식이 깔끔한 것 같아요. 이런 방식으로 사용할 수도 있군용! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <style> | ||
| .sidebar-header img { | ||
| height: 50px; | ||
| width: auto; | ||
| } | ||
|
|
||
| .sidebar-header a { | ||
| display: flex; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .sidebar-header a::after { | ||
| content: "TIMO DESIGN SYSTEM"; | ||
| font-size: 13px; | ||
| font-weight: 700; | ||
| color: #1f1f1f; | ||
| margin-left: 10px; | ||
| letter-spacing: 0.04em; | ||
| white-space: nowrap; | ||
| } | ||
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { addons } from "@storybook/manager-api"; | ||
|
|
||
| import { timoTheme } from "./theme"; | ||
|
|
||
| addons.setConfig({ | ||
| theme: timoTheme, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import { create } from "@storybook/theming"; | ||
|
|
||
| export const timoTheme = create({ | ||
| base: "light", | ||
|
|
||
| brandImage: "/timo-logo/timo-logo.png", | ||
| brandTitle: "TIMO DESIGN SYSTEM", | ||
| brandUrl: "https://timo.kr", | ||
| brandTarget: "_blank", | ||
|
|
||
| // 배경 | ||
| colorPrimary: "#74A0F8", | ||
| colorSecondary: "#8CB0F9", | ||
|
|
||
| // UI | ||
| appBg: "#f5f5f5", | ||
| appContentBg: "#ffffff", | ||
| appPreviewBg: "#ffffff", | ||
| appBorderColor: "#e5e5e5", | ||
| appBorderRadius: 10, | ||
|
|
||
| // 텍스트 | ||
| textColor: "#1f1f1f", | ||
| textMutedColor: "#757575", | ||
| textInverseColor: "#ffffff", | ||
|
|
||
| // 툴바 | ||
| barTextColor: "#525252", | ||
| barHoverColor: "#8CB0F9", | ||
| barSelectedColor: "#74a0f8", | ||
| barBg: "#ffffff", | ||
|
|
||
| // 인풋 | ||
| inputBg: "#ffffff", | ||
| inputBorder: "#e5e5e5", | ||
| inputTextColor: "#1f1f1f", | ||
| inputBorderRadius: 6, | ||
|
|
||
| // 버튼 | ||
| buttonBg: "#f5f5f5", | ||
| buttonBorder: "#e5e5e5", | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| declare module "*.css"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| export { Color } from "./color/Color"; | ||
| export { Typography } from "./typography/Typography"; | ||
| export { Tag } from "./tag/Tag"; | ||
| export { PriorityIcon } from "./priority-icon/PriorityIcon"; |
91 changes: 91 additions & 0 deletions
91
packages/timo-design-system/src/components/priority-icon/PriorityIcon.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| import { PriorityIcon, type Priority } from "./PriorityIcon"; | ||
|
|
||
| import type { Meta, StoryObj } from "@storybook/react"; | ||
|
|
||
| const meta = { | ||
| title: "Components/PriorityIcon", | ||
| component: PriorityIcon, | ||
| parameters: { | ||
| layout: "centered", | ||
| }, | ||
| argTypes: { | ||
| priority: { | ||
| control: "select", | ||
| options: ["매우중요", "중요", "보통", "낮음", "Disable", "white", "blue"], | ||
| }, | ||
| }, | ||
| } satisfies Meta<typeof PriorityIcon>; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
|
|
||
| export const 매우중요: Story = { | ||
| args: { priority: "매우중요" }, | ||
| }; | ||
|
|
||
| export const 중요: Story = { | ||
| args: { priority: "중요" }, | ||
| }; | ||
|
|
||
| export const 보통: Story = { | ||
| args: { priority: "보통" }, | ||
| }; | ||
|
|
||
| export const 낮음: Story = { | ||
| args: { priority: "낮음" }, | ||
| }; | ||
|
|
||
| export const Disable: Story = { | ||
| args: { priority: "Disable" }, | ||
| }; | ||
|
|
||
| export const white: Story = { | ||
| args: { priority: "white" }, | ||
| parameters: { | ||
| backgrounds: { | ||
| default: "dark", | ||
| values: [ | ||
| { name: "light-gray", value: "#F5F5F5" }, | ||
| { name: "dark", value: "#333333" }, | ||
| { name: "white", value: "#FFFFFF" }, | ||
| ], | ||
| }, | ||
| }, | ||
| }; | ||
| export const blue: Story = { | ||
| args: { priority: "blue" }, | ||
| }; | ||
|
|
||
| const ALL_PRIORITIES: Priority[] = [ | ||
| "매우중요", | ||
| "중요", | ||
| "보통", | ||
| "낮음", | ||
| "Disable", | ||
| "white", | ||
| "blue", | ||
| ]; | ||
|
|
||
| export const AllPriorities: Story = { | ||
| args: { priority: "매우중요" }, | ||
| parameters: { | ||
| backgrounds: { | ||
| default: "light-gray", | ||
| values: [ | ||
| { name: "light-gray", value: "#F5F5F5" }, | ||
| { name: "dark", value: "#333333" }, | ||
| { name: "white", value: "#FFFFFF" }, | ||
| ], | ||
| }, | ||
| }, | ||
| render: () => ( | ||
| <div className="flex items-center gap-3"> | ||
| {ALL_PRIORITIES.map((priority) => ( | ||
| <div key={priority} className="flex flex-col items-center gap-1.5"> | ||
| <PriorityIcon priority={priority} /> | ||
| <span style={{ fontSize: 10, color: "#666" }}>{priority}</span> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| ), | ||
| }; |
32 changes: 32 additions & 0 deletions
32
packages/timo-design-system/src/components/priority-icon/PriorityIcon.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { cn } from "../../lib"; | ||
|
|
||
| export type Priority = | ||
| | "매우중요" | ||
| | "중요" | ||
| | "보통" | ||
| | "낮음" | ||
| | "Disable" | ||
| | "white" | ||
| | "blue"; | ||
|
|
||
| const PRIORITY_COLOR: Record<Priority, string> = { | ||
| 매우중요: "bg-timo-red", | ||
| 중요: "bg-timo-orange", | ||
| 보통: "bg-timo-gray-600", | ||
| 낮음: "bg-timo-black", | ||
| Disable: "bg-timo-gray-500", | ||
| white: "bg-white", | ||
| blue: "bg-timo-blue-300", | ||
| }; | ||
|
|
||
| export interface PriorityIconProps { | ||
| priority: Priority; | ||
| } | ||
|
|
||
| export const PriorityIcon = ({ priority }: PriorityIconProps) => { | ||
| return ( | ||
| <div | ||
| className={cn("size-4.5 shrink-0 rounded-full", PRIORITY_COLOR[priority])} | ||
| /> | ||
| ); | ||
| }; |
33 changes: 33 additions & 0 deletions
33
packages/timo-design-system/src/components/tag/Tag.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import { Tag } from "./Tag"; | ||
|
|
||
| import type { Meta, StoryObj } from "@storybook/react"; | ||
|
|
||
| const meta = { | ||
| title: "Components/Tag", | ||
| component: Tag, | ||
| parameters: { | ||
| layout: "centered", | ||
| }, | ||
| argTypes: { | ||
| text: { | ||
| control: "text", | ||
| description: "태그에 표시될 텍스트", | ||
| }, | ||
| variant: { | ||
| control: "select", | ||
| options: ["default", "blue"], | ||
| description: "태그 스타일 베리언트", | ||
| }, | ||
| }, | ||
| } satisfies Meta<typeof Tag>; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
|
|
||
| export const Default: Story = { | ||
| args: { text: "과제", variant: "default" }, | ||
| }; | ||
|
|
||
| export const Blue: Story = { | ||
| args: { text: "과제", variant: "blue" }, | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.