PR-188649:

Adding Storybook.
This commit is contained in:
2022-05-30 18:46:55 +00:00
parent c693b4f6a2
commit aa4ac6761b
16 changed files with 29652 additions and 27 deletions

36
.storybook/main.js Normal file
View File

@ -0,0 +1,36 @@
const path = require('path');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-postcss",
"@storybook/preset-scss"
],
"webpackFinal": async config => {
config.resolve.alias = { ...config.resolve.alias,
'@components': path.resolve(__dirname, "../src/components/")
};
config.resolve.plugins = [new TsconfigPathsPlugin()];
return config;
},
"framework": "@storybook/react",
"core": {
"builder": "@storybook/builder-webpack5"
},
typescript: {
reactDocgenTypescriptOptions: {
compilerOptions: {
"paths": {
"@Components/*": ["Components/*"],
},
}
}
},
}

9
.storybook/preview.js Normal file
View File

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