Skip to content

Commit

Permalink
deps: upgrade storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
kawamataryo committed Nov 24, 2024
1 parent 530db6f commit f0dde0d
Show file tree
Hide file tree
Showing 8 changed files with 14,175 additions and 27,595 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ publish_keys.json
docs/.vitepress/cache

project.zip

*storybook.log
18 changes: 10 additions & 8 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
import type { StorybookConfig } from "@storybook/react-vite";

import { defineConfig } from 'vite';

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
viteFinal: (config) => {
config.define = {
...config.define,
'process.env': process.env,
"process.env": process.env,
esbuild: {
jsx: "automatic",
},
};
return config;
},
typescript: {
reactDocgen: "react-docgen-typescript",
},
};

export default config;
5 changes: 3 additions & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import type { Preview } from "@storybook/react";
import '../src/style.content.css';
import "../src/style.content.css";

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

tags: ["autodocs"],
};

export default preview;
Loading

0 comments on commit f0dde0d

Please sign in to comment.