Skip to content

Commit a95c3e2

Browse files
committed
⚙️chore: storybook 설치
1 parent 7c81591 commit a95c3e2

32 files changed

Lines changed: 6249 additions & 544 deletions

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"next/core-web-vitals",
44
"airbnb",
55
"airbnb-typescript",
6-
"prettier"
6+
"prettier",
7+
"plugin:storybook/recommended"
78
],
89
"parserOptions": {
910
"project": "./tsconfig.json"
@@ -19,4 +20,4 @@
1920
"react/jsx-boolean-value": "off",
2021
"no-console": "off"
2122
}
22-
}
23+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ next-env.d.ts
3737

3838
.env
3939

40-
.prettierrc
40+
.prettierrc
41+
*storybook.log
42+
storybook-static

.storybook/main.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type { StorybookConfig } from '@storybook/nextjs';
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5+
addons: [
6+
'@chromatic-com/storybook',
7+
'@storybook/addon-docs',
8+
'@storybook/addon-onboarding',
9+
'@storybook/addon-a11y'
10+
],
11+
framework: {
12+
name: '@storybook/nextjs',
13+
options: {}
14+
},
15+
staticDirs: ['../public']
16+
};
17+
export default config;

.storybook/preview.ts

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

0 commit comments

Comments
 (0)