Skip to content

Commit

Permalink
[Closes #261] Storybook integration (#265)
Browse files Browse the repository at this point in the history
Co-authored-by: Max Isom <[email protected]>
  • Loading branch information
francisli and codetheweb authored Nov 18, 2023
1 parent db0f807 commit 60847b6
Show file tree
Hide file tree
Showing 7 changed files with 17,779 additions and 5,057 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parser": "@typescript-eslint/parser",
"extends": "next/core-web-vitals",
"extends": ["next/core-web-vitals", "plugin:storybook/recommended"],
"ignorePatterns": ["*.json"],
"overrides": [
{
Expand Down
21 changes: 21 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { StorybookConfig } from "@storybook/nextjs";

const config: StorybookConfig = {
staticDirs: ["../public"],
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
"@tomfreudenberg/next-auth-mock/storybook",
],
framework: {
name: "@storybook/nextjs",
options: {},
},
docs: {
autodocs: "tag",
},
};
export default config;
17 changes: 17 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Preview } from "@storybook/react";

import "../src/styles/globals.css";

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
Loading

0 comments on commit 60847b6

Please sign in to comment.