Skip to content

Commit 33d0c0f

Browse files
committed
feat: add storybook
1 parent 1012a26 commit 33d0c0f

File tree

11 files changed

+14506
-1370
lines changed

11 files changed

+14506
-1370
lines changed

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
"extends": "next/core-web-vitals",
2+
"extends": [
3+
"next/core-web-vitals",
4+
"plugin:storybook/recommended"
5+
],
36
"rules": {
47
"react/no-unescaped-entities": "off",
58
"@next/next/no-img-element": "off"

.storybook/main.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { StorybookConfig } from "@storybook/nextjs";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
5+
addons: [
6+
"@storybook/addon-links",
7+
"@storybook/addon-essentials",
8+
"@storybook/addon-interactions",
9+
{
10+
name: "@storybook/addon-styling",
11+
options: {
12+
// Check out https://github.com/storybookjs/addon-styling/blob/main/docs/api.md
13+
// For more details on this addon's options.
14+
postCss: true,
15+
},
16+
},
17+
],
18+
framework: {
19+
name: "@storybook/nextjs",
20+
options: {},
21+
},
22+
docs: {
23+
autodocs: "tag",
24+
},
25+
};
26+
27+
export default config;

.storybook/preview.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import "../src/app/globals.css";
2+
import type { Preview } from "@storybook/react";
3+
4+
const preview: Preview = {
5+
parameters: {
6+
actions: { argTypesRegex: "^on[A-Z].*" },
7+
controls: {
8+
matchers: {
9+
color: /(background|color)$/i,
10+
date: /Date$/,
11+
},
12+
},
13+
backgrounds: {
14+
default: "github",
15+
values: [
16+
{
17+
name: "github",
18+
value: "#0d1117",
19+
},
20+
],
21+
},
22+
},
23+
};
24+
25+
export default preview;

.vercelignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.github
22
.husky
33
node_modules
4-
**/.gitkeep
4+
\*\*/.gitkeep
55
docs
66
scripts
7-
*.md
7+
\*.md

0 commit comments

Comments
 (0)