mirror of
https://github.com/dzeiocom/components.git
synced 2025-06-12 18:49:21 +00:00
Initial Commit
This commit is contained in:
21
.storybook/main.js
Normal file
21
.storybook/main.js
Normal file
@ -0,0 +1,21 @@
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
"stories": [
|
||||
"../src/dzeio/**/*.stories.@(js|jsx|ts|tsx)",
|
||||
],
|
||||
"addons": [
|
||||
"@storybook/addon-links",
|
||||
"@storybook/addon-essentials"
|
||||
],
|
||||
typescript: {
|
||||
check: false,
|
||||
checkOptions: {},
|
||||
reactDocgen: 'react-docgen-typescript',
|
||||
reactDocgenTypescriptOptions: {
|
||||
shouldExtractLiteralValuesFromEnum: true,
|
||||
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
||||
},
|
||||
},
|
||||
presets: [path.resolve(__dirname, "./next.js")]
|
||||
}
|
36
.storybook/next.js
Normal file
36
.storybook/next.js
Normal file
@ -0,0 +1,36 @@
|
||||
module.exports = {
|
||||
webpackFinal: async (baseConfig, options) => {
|
||||
const { module = {} } = baseConfig;
|
||||
|
||||
const newConfig = {
|
||||
...baseConfig,
|
||||
module: {
|
||||
...module,
|
||||
rules: [...(module.rules || [])],
|
||||
},
|
||||
};
|
||||
|
||||
// TypeScript
|
||||
newConfig.module.rules.push({
|
||||
test: /\.(ts|tsx)$/,
|
||||
// include: [path.resolve(__dirname, '../src/client/components')],
|
||||
use: ['babel-loader', 'ts-loader']
|
||||
});
|
||||
newConfig.resolve.extensions.push('.ts', '.tsx');
|
||||
|
||||
// SCSS
|
||||
newConfig.module.rules.push({
|
||||
test: /\.styl$/,
|
||||
use: ['style-loader', {
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
modules: true
|
||||
},
|
||||
}, 'stylus-loader'],
|
||||
});
|
||||
newConfig.resolve.extensions.push('.styl');
|
||||
|
||||
return newConfig;
|
||||
},
|
||||
};
|
4
.storybook/preview.js
Normal file
4
.storybook/preview.js
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
export const parameters = {
|
||||
actions: { argTypesRegex: "^on[A-Z].*" },
|
||||
}
|
Reference in New Issue
Block a user