-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated storybook and its dependencies (#86791wyem)
- Loading branch information
1 parent
d6bcf8b
commit 47d3e6c
Showing
56 changed files
with
24,617 additions
and
36,213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,56 @@ | ||
module.exports = { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
staticDirs: ['../public'], | ||
|
||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'storybook-addon-jsx', | ||
'@storybook/addon-a11y', | ||
'@whitespace/storybook-addon-html', | ||
'@storybook/addon-styling-webpack', | ||
{ | ||
name: '@storybook/addon-postcss', | ||
name: '@storybook/addon-styling-webpack', | ||
|
||
options: { | ||
postcssLoaderOptions: { | ||
implementation: require('postcss') | ||
} | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
sideEffects: true, | ||
use: [ | ||
require.resolve('style-loader'), | ||
{ | ||
loader: require.resolve('css-loader'), | ||
options: { | ||
importLoaders: 1 | ||
} | ||
}, | ||
{ | ||
loader: require.resolve('postcss-loader'), | ||
options: { | ||
implementation: require.resolve('postcss') | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
'storybook-addon-jsx', | ||
'@storybook/addon-a11y', | ||
'@whitespace/storybook-addon-html' | ||
} | ||
], | ||
core: { | ||
// builder: '@storybook/builder-vite' | ||
builder: 'webpack5' | ||
|
||
// babel: async (options) => ({ | ||
// ...options, | ||
// // If updating the plugin list make sure you update .babelrc as well, and vice versa | ||
// // Macros is not needed here because styled components now includes it too | ||
// plugins: [...options.plugins, 'babel-plugin-styled-components'] | ||
// }), | ||
|
||
framework: { | ||
name: '@storybook/nextjs', | ||
options: {} | ||
}, | ||
babel: async (options) => ({ | ||
...options, | ||
// If updating the plugin list make sure you update .babelrc as well, and vice versa | ||
// Macros is not needed here because styled components now includes it too | ||
plugins: [...options.plugins, 'babel-plugin-styled-components'] | ||
}) | ||
|
||
docs: { | ||
autodocs: true | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import { addDecorator } from '@storybook/react'; | ||
import { jsxDecorator } from 'storybook-addon-jsx'; | ||
import '../src/styles/globals.css'; | ||
|
||
addDecorator(jsxDecorator); | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: '^on[A-Z].*' } | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.