Skip to content

Commit ea0d626

Browse files
authored
Merge pull request #12 from kusitms-com/feat/image-box-component-9
[Feat] Image Box 컴포넌트 제작
2 parents 7305c2c + e4be435 commit ea0d626

64 files changed

Lines changed: 2079 additions & 1945 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Storybook
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: 'pages'
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build-and-deploy:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
persist-credentials: false
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
version: 10
33+
run_install: false
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 22
39+
cache: pnpm
40+
41+
- name: Install dependencies
42+
run: pnpm install --frozen-lockfile
43+
44+
- name: Build Storybook
45+
run: pnpm build-storybook
46+
env:
47+
STORYBOOK_BASE_PATH: /makers-admin-fe/
48+
49+
- name: Setup Pages
50+
uses: actions/configure-pages@v4
51+
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: storybook-static
56+
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.storybook/main.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import path from 'path'
2+
import { fileURLToPath } from 'node:url'
3+
import tailwindcss from '@tailwindcss/vite'
4+
import type { StorybookConfig } from '@storybook/react-vite'
5+
6+
const dirname = path.dirname(fileURLToPath(import.meta.url))
7+
8+
const config: StorybookConfig = {
9+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
10+
addons: ['@storybook/addon-a11y', '@storybook/addon-docs'],
11+
framework: '@storybook/react-vite',
12+
viteFinal: (viteConfig) => {
13+
viteConfig.plugins ??= []
14+
viteConfig.plugins.push(tailwindcss())
15+
viteConfig.resolve ??= {}
16+
viteConfig.resolve.alias = {
17+
'@': path.resolve(dirname, '../src'),
18+
'@api': path.resolve(dirname, '../src/api'),
19+
'@components': path.resolve(dirname, '../src/components'),
20+
'@hooks': path.resolve(dirname, '../src/hooks'),
21+
'@lib': path.resolve(dirname, '../src/lib'),
22+
'@pages': path.resolve(dirname, '../src/pages'),
23+
}
24+
if (process.env.STORYBOOK_BASE_PATH) {
25+
viteConfig.base = process.env.STORYBOOK_BASE_PATH
26+
}
27+
return viteConfig
28+
},
29+
}
30+
export default config

.storybook/preview.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { Preview } from '@storybook/react-vite'
2+
import '../src/index.css'
3+
4+
const preview: Preview = {
5+
parameters: {
6+
controls: {
7+
matchers: {
8+
color: /(background|color)$/i,
9+
date: /Date$/i,
10+
},
11+
},
12+
},
13+
}
14+
15+
export default preview

components.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

eslint.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import jsxA11y from 'eslint-plugin-jsx-a11y'
66
import tseslint from 'typescript-eslint'
77
import { defineConfig, globalIgnores } from 'eslint/config'
88
import prettierConfig from 'eslint-config-prettier'
9+
import storybook from 'eslint-plugin-storybook'
910

1011
export default defineConfig([
1112
globalIgnores([
1213
'dist',
1314
'build',
15+
'storybook-static',
1416
'node_modules',
1517
'coverage',
1618
'playwright-report',
@@ -31,7 +33,12 @@ export default defineConfig([
3133
files: ['**/*.{jsx,tsx}'],
3234
},
3335
{
34-
files: ['*.config.{ts,js}', 'e2e/**/*.ts', '.claude/hooks/**/*.mjs'],
36+
files: [
37+
'*.config.{ts,js}',
38+
'e2e/**/*.ts',
39+
'.claude/hooks/**/*.mjs',
40+
'.storybook/**/*.{ts,tsx}',
41+
],
3542
languageOptions: {
3643
globals: {
3744
...globals.node,
@@ -51,7 +58,7 @@ export default defineConfig([
5158
},
5259
},
5360
{
54-
files: ['src/**/*.{ts,tsx}', 'scripts/**/*.ts'],
61+
files: ['src/**/*.{ts,tsx}', 'scripts/**/*.ts', '.storybook/**/*.{ts,tsx}'],
5562
extends: [...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked],
5663
languageOptions: {
5764
globals: {
@@ -76,4 +83,5 @@ export default defineConfig([
7683
},
7784
},
7885
prettierConfig,
86+
...storybook.configs['flat/recommended'],
7987
])

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"test": "vitest",
1919
"test:ui": "vitest --ui",
2020
"test:coverage": "vitest run --coverage",
21-
"test:e2e": "playwright test"
21+
"test:e2e": "playwright test",
22+
"storybook": "storybook dev -p 6006",
23+
"build-storybook": "storybook build"
2224
},
2325
"dependencies": {
2426
"@base-ui/react": "^1.4.1",
@@ -33,10 +35,8 @@
3335
"react-dom": "^19.2.6",
3436
"react-hook-form": "^7.76.0",
3537
"react-router": "^8.1.0",
36-
"shadcn": "^4.7.0",
3738
"tailwind-merge": "^3.6.0",
3839
"tailwind-variants": "^3.2.2",
39-
"tw-animate-css": "^1.4.0",
4040
"zod": "^4.4.3",
4141
"zustand": "^5.0.13"
4242
},
@@ -45,6 +45,9 @@
4545
"@commitlint/config-conventional": "^21.2.0",
4646
"@eslint/js": "^10.0.1",
4747
"@playwright/test": "^1.60.0",
48+
"@storybook/addon-a11y": "10.4.6",
49+
"@storybook/addon-docs": "10.4.6",
50+
"@storybook/react-vite": "10.4.6",
4851
"@svgr/core": "^8.1.0",
4952
"@svgr/plugin-jsx": "^8.1.0",
5053
"@svgr/plugin-svgo": "^8.1.0",
@@ -61,12 +64,14 @@
6164
"eslint-plugin-jsx-a11y": "^6.10.2",
6265
"eslint-plugin-react-hooks": "^7.1.1",
6366
"eslint-plugin-react-refresh": "^0.5.2",
67+
"eslint-plugin-storybook": "10.4.6",
6468
"globals": "^17.6.0",
6569
"happy-dom": "^20.9.0",
6670
"husky": "^8.0.0",
6771
"lint-staged": "^16.4.0",
6872
"prettier": "^3.8.3",
6973
"prettier-plugin-tailwindcss": "^0.8.0",
74+
"storybook": "10.4.6",
7075
"tailwindcss": "^4.3.0",
7176
"tsx": "^4.22.4",
7277
"typescript": "~6.0.2",

0 commit comments

Comments
 (0)