Repository navigation
[INIT] 공유 UI 패키지 Storybook 초기 구성 및 chromatic 배포 #25
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 4 commits
5e21bc2
26b440c
9371293
a6804c1
d8196aa
ba3234e
7ef42d9
4f9a479
143441f
ad16210
8e77421
218a3c0
f83dfad
fcdaf03
1110548
a00bff3
e9239e7
14d7239
8adfc30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // 스토리북이 어디서 스토리 파일을 찾을지 정하는 곳 | ||
| import type { StorybookConfig } from "@storybook/react-vite"; | ||
|
|
||
| const config: StorybookConfig = { | ||
| stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
| addons: ["@storybook/addon-links"], | ||
| framework: { | ||
| name: "@storybook/react-vite", | ||
| options: {}, | ||
| }, | ||
| }; | ||
|
|
||
| export default config; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import type { Preview } from "@storybook/react-vite"; | ||
|
|
||
| const preview: Preview = { | ||
| parameters: { | ||
| controls: { | ||
| matchers: { | ||
| color: /(background|color)$/i, | ||
| date: /Date$/i, | ||
| }, | ||
|
yumin-kim2 marked this conversation as resolved.
|
||
| }, | ||
| viewport: { | ||
| viewports: { | ||
| mobile: { name: "Mobile", styles: { width: "375px", height: "812px" } }, | ||
| tablet: { | ||
| name: "Tablet", | ||
| styles: { width: "768px", height: "1024px" }, | ||
| }, | ||
| desktop: { | ||
| name: "Desktop", | ||
| styles: { width: "1280px", height: "900px" }, | ||
| }, | ||
| }, | ||
| defaultViewport: "desktop", | ||
| }, | ||
| layout: "centered", | ||
| }, | ||
| }; | ||
|
|
||
| export default preview; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,15 +8,20 @@ | |
| "scripts": { | ||
| "lint": "eslint . --max-warnings 0", | ||
| "generate:component": "turbo gen react-component", | ||
| "check-types": "tsc --noEmit" | ||
| "check-types": "tsc --noEmit", | ||
| "storybook": "storybook dev -p 6006", | ||
| "build-storybook": "storybook build" | ||
| }, | ||
| "devDependencies": { | ||
| "@repo/eslint-config": "workspace:*", | ||
| "@repo/typescript-config": "workspace:*", | ||
| "@storybook/addon-links": "^10.4.6", | ||
|
Member
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. @storybook/addon-a11y, @storybook/addon-essentials 과 같은 유용한 도구를 추가해도 좋을 것 같아요 addon-a11y 같은 경우는 각 스토리에 접근성 탭을 추가해서 WCAG 위반을 바로 확인할 수 있게 해 주고,
Contributor
Author
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. 좋은 의견 감사합니다!
다만 Storybook 10.4.6
@storybook/addon-essentials@8.6.14
@storybook/addon-interactions@8.6.14 |
||
| "@storybook/react-vite": "^10.4.6", | ||
| "@types/node": "^22.15.3", | ||
| "@types/react": "19.2.2", | ||
| "@types/react-dom": "19.2.2", | ||
| "eslint": "^9.39.1", | ||
| "storybook": "^10.4.6", | ||
| "typescript": "5.9.2" | ||
| }, | ||
| "dependencies": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,17 @@ | ||||||||||||||||||||||||||
| import type { Meta, StoryObj } from "@storybook/react-vite"; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const Introduction = () => ( | ||||||||||||||||||||||||||
| <div> | ||||||||||||||||||||||||||
| <h1>Timo Design System</h1> | ||||||||||||||||||||||||||
| <p>디자인 시스템 확정 후 공통 컴포넌트와 아이콘을 추가합니다.</p> | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||
|
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 | 🟡 Minor | ⚡ Quick win
로컬 컴포넌트가 💡 Proposed fix-const Introduction = () => (
- <div>
- <h1>Timo Design System</h1>
- <p>디자인 시스템 확정 후 공통 컴포넌트와 아이콘을 추가합니다.</p>
- </div>
-);
+export const Introduction = () => (
+ <>
+ <h1>Timo Design System</h1>
+ <p>디자인 시스템 확정 후 공통 컴포넌트와 아이콘을 추가합니다.</p>
+ </>
+);📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Path instructions |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const meta: Meta<typeof Introduction> = { | ||||||||||||||||||||||||||
| title: "Introduction", | ||||||||||||||||||||||||||
| component: Introduction, | ||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| export default meta; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| export const Default: StoryObj<typeof Introduction> = {}; | ||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.