(frontend) add storybook to react repo

Add storybook for the react repo, this will make developing components
enjoyable ! It can also serve as a single source of thruth.
This commit is contained in:
Nathan Vasse
2022-12-01 12:05:22 +01:00
committed by NathanVss
parent 75f2617726
commit 4beff43ebe
3 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
'@storybook/preset-scss'
],
"framework": "@storybook/react",
"core": {
"builder": "@storybook/builder-vite"
},
staticDirs: [
'dist',
],
"features": {
"storyStoreV7": true
}
}

View File

@@ -0,0 +1,4 @@
<link rel='stylesheet' type='text/css' href='/src/index.scss'>
<script>
window.global = window;
</script>

View File

@@ -0,0 +1,9 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}