Skip to content
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist
coverage
.vscode
server-build

*storybook.log
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"semi": false,
"singleQuote": true,
"endOfLine": "lf",
"printWidth": 140
Expand Down
39 changes: 19 additions & 20 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
const path = require('path');

// Export a function. Accept the base config as the only param.
module.exports = {
stories: ["../src/**/*.story.jsx"],
webpackFinal: async (config, { configType }) => {
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.

// Make whatever fine-grained changes you need
config.module.rules.push({
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
include: path.resolve(__dirname, '../src'),
});

// Return the altered config
return config;
/** @type { import('@storybook/react-webpack5').StorybookConfig } */
const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-webpack5-compiler-swc',
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
};
docs: {
autodocs: 'tag',
},
}
export default config
13 changes: 13 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type { import('@storybook/react').Preview } */
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}

export default preview
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ To run Bundle Analyzer
npm run build-analyze
```

In case storybook does not work
npx sb init


## Contributors ✨

Expand Down
Loading