mirror of
https://github.com/aleleba/create-react-component-library.git
synced 2025-06-20 12:58:19 -06:00
PR-491193:
Adding first code.
This commit is contained in:
33
.storybook/main.js
Normal file
33
.storybook/main.js
Normal file
@ -0,0 +1,33 @@
|
||||
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: "webpack5"
|
||||
},
|
||||
typescript: {
|
||||
reactDocgenTypescriptOptions: {
|
||||
compilerOptions: {
|
||||
"paths": {
|
||||
"@Components/*": ["Components/*"],
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
9
.storybook/preview.js
Normal file
9
.storybook/preview.js
Normal file
@ -0,0 +1,9 @@
|
||||
export const parameters = {
|
||||
actions: { argTypesRegex: "^on[A-Z].*" },
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/,
|
||||
},
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user