Skip to content

Commit c808dee

Browse files
authored
Merge pull request #51 from YAPP-Github/feature/PRODUCT-96
feat: 버튼 컴포넌트 구현 및 디자인 토큰 생성 및 크로마틱 워크플로우 생성 (#49)
2 parents f1e8295 + cfc7537 commit c808dee

15 files changed

Lines changed: 626 additions & 5 deletions

File tree

.github/workflows/chromatic.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Storybook Chromatic Deployment
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
storybook-preview:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "22"
24+
cache: "pnpm"
25+
26+
- name: Install dependencies
27+
run: pnpm install
28+
29+
- name: Publish to Chromatic
30+
id: chromatic
31+
uses: chromaui/action@latest
32+
with:
33+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
onlyChanged: true
36+
autoAcceptChanges: true
37+
38+
- name: Comment PR
39+
if: always()
40+
uses: thollander/actions-comment-pull-request@v3
41+
with:
42+
comment-tag: chromatic-preview-${{ github.event.number }}
43+
message: |
44+
🎨 **Storybook Preview**: ${{ steps.chromatic.outputs.storybookUrl }}
45+
🔗 **Chromatic Build**: ${{ steps.chromatic.outputs.buildUrl }}

.storybook/main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import type { StorybookConfig } from "@storybook/experimental-nextjs-vite";
2+
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
3+
import tsconfigPaths from "vite-tsconfig-paths";
24

35
const config: StorybookConfig = {
46
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
@@ -8,5 +10,13 @@ const config: StorybookConfig = {
810
options: {},
911
},
1012
staticDirs: ["../public"],
13+
viteFinal: async config => {
14+
config.plugins = [
15+
...(config.plugins || []),
16+
tsconfigPaths(),
17+
vanillaExtractPlugin(),
18+
];
19+
return config;
20+
},
1121
};
1222
export default config;

.storybook/preview.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
import type { Preview } from '@storybook/react'
1+
import "@/styles/reset.css.ts";
2+
3+
import type { Preview } from "@storybook/react";
24

35
const preview: Preview = {
46
parameters: {
57
controls: {
68
matchers: {
7-
color: /(background|color)$/i,
8-
date: /Date$/i,
9+
color: /(background|color)$/i,
10+
date: /Date$/i,
911
},
1012
},
1113
},
1214
};
1315

14-
export default preview;
16+
export default preview;

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@tanstack/react-query": "^5.77.0",
2020
"@tanstack/react-query-devtools": "^5.77.0",
2121
"@vanilla-extract/css": "^1.17.2",
22+
"@vanilla-extract/recipes": "^0.5.7",
2223
"next": "15.3.2",
2324
"react": "^19.0.0",
2425
"react-dom": "^19.0.0"
@@ -42,10 +43,12 @@
4243
"@types/react": "^19",
4344
"@types/react-dom": "^19",
4445
"@vanilla-extract/next-plugin": "^2.4.11",
46+
"@vanilla-extract/vite-plugin": "^5.0.7",
4547
"@vitejs/plugin-react": "^4.5.0",
4648
"@vitest/browser": "^3.1.4",
4749
"@vitest/coverage-v8": "^3.1.4",
4850
"@vitest/eslint-plugin": "^1.2.1",
51+
"chromatic": "^13.0.1",
4952
"commitizen": "^4.3.1",
5053
"eslint": "^9",
5154
"eslint-config-next": "15.3.2",

pnpm-lock.yaml

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import "@/styles/reset.css";
2+
13
import type { Metadata } from "next";
24

35
import { RegisterServiceWorkerClient } from "@/lib/pwa";
46
import { MSWProvider, QueryProvider } from "@/providers";
57

68
export const metadata: Metadata = {
7-
title: "Timeat",
9+
title: "Eat-da",
810
description: "Generated by create next app",
911
};
1012

0 commit comments

Comments
 (0)