Skip to content

Commit 1fbc58e

Browse files
committed
set up Storybook
1 parent a3e0a53 commit 1fbc58e

File tree

6 files changed

+15383
-2748
lines changed

6 files changed

+15383
-2748
lines changed

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": [
3+
"next/core-web-vitals",
4+
"plugin:storybook/recommended"
5+
]
36
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ yarn-error.log*
3333
# typescript
3434
*.tsbuildinfo
3535
next-env.d.ts
36+
37+
*storybook.log

.storybook/main.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { StorybookConfig } from "@storybook/nextjs";
2+
3+
const config: StorybookConfig = {
4+
stories: [
5+
"../app/**/*.mdx",
6+
"../app/**/*.stories.@(js|jsx|mjs|ts|tsx)",
7+
],
8+
addons: [
9+
"@storybook/addon-links",
10+
"@storybook/addon-essentials",
11+
"@storybook/addon-interactions",
12+
],
13+
framework: {
14+
name: "@storybook/nextjs",
15+
options: {},
16+
},
17+
docs: {
18+
autodocs: "tag",
19+
},
20+
staticDirs: ["../public"],
21+
};
22+
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/react";
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)