Skip to content

Commit 9efb84a

Browse files
ElenVlassShchepotin
authored andcommitted
feat(Storybook): add storybook
1 parent 58a5347 commit 9efb84a

File tree

8 files changed

+14262
-1904
lines changed

8 files changed

+14262
-1904
lines changed

.eslintrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2-
"extends": ["next", "plugin:@typescript-eslint/recommended", "prettier"],
2+
"extends": [
3+
"next",
4+
"plugin:@typescript-eslint/recommended",
5+
"prettier",
6+
"plugin:storybook/recommended"
7+
],
38
"parser": "@typescript-eslint/parser",
49
"plugins": ["@typescript-eslint", "prettier"],
510
"root": true,

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ next-env.d.ts
3737
/playwright-report/
3838
/blob-report/
3939
/playwright/.cache/
40+
41+
*storybook.log

.storybook/main.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
"@storybook/addon-onboarding",
7+
"@storybook/addon-links",
8+
"@storybook/addon-essentials",
9+
"@chromatic-com/storybook",
10+
"@storybook/addon-interactions",
11+
],
12+
framework: {
13+
name: "@storybook/nextjs",
14+
options: {},
15+
},
16+
staticDirs: ["../public"],
17+
};
18+
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)