First draft: add chromatic/storybook

This commit is contained in:
Matthew Wang
2023-04-24 13:20:58 -07:00
parent e0231653a8
commit 7e6bbb9e6a
11 changed files with 20010 additions and 31 deletions

17
.storybook/main.js Normal file
View File

@@ -0,0 +1,17 @@
/** @type { import('@storybook/html-webpack5').StorybookConfig } */
const config = {
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/html-webpack5",
options: {},
},
docs: {
autodocs: "tag",
},
}
export default config

14
.storybook/preview.js Normal file
View File

@@ -0,0 +1,14 @@
/** @type { import('@storybook/html').Preview } */
const preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
}
export default preview