Skip to content

Commit a79dcad

Browse files
Merge pull request #95 from chrisvogt/storybook-upgrades
chore: upgrades Storybook to v10 and modernize story format
2 parents 99f7c39 + 86060ee commit a79dcad

File tree

7 files changed

+2095
-3186
lines changed

7 files changed

+2095
-3186
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"@babel/preset-react"
1010
],
1111
"plugins": [
12-
"@babel/plugin-transform-runtime",
13-
"inline-react-svg"
12+
"@babel/plugin-transform-runtime"
1413
]
1514
}

.storybook/main.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ const path = require('path');
22

33
module.exports = {
44
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
5-
addons: [
6-
'@storybook/addon-essentials',
7-
'@storybook/addon-webpack5-compiler-babel'
8-
],
5+
addons: ['@storybook/addon-webpack5-compiler-babel', '@storybook/addon-docs'],
96
framework: {
107
name: '@storybook/react-webpack5',
118
options: {}

.storybook/preview.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
export const parameters = {
2-
actions: { argTypesRegex: '^on[A-Z].*' },
3-
controls: {
4-
matchers: {
5-
color: /(background|color)$/i,
6-
date: /Date$/
1+
const preview = {
2+
parameters: {
3+
actions: { argTypesRegex: '^on[A-Z].*' },
4+
controls: {
5+
matchers: {
6+
color: /(background|color)$/i,
7+
date: /Date$/
8+
}
79
}
810
}
911
};
12+
13+
export default preview;

0 commit comments

Comments
 (0)