Skip to content

Commit 2c693f2

Browse files
committed
chore: update storybook to v7.5.3
1 parent e716b86 commit 2c693f2

File tree

4 files changed

+3744
-5235
lines changed

4 files changed

+3744
-5235
lines changed

app/.storybook/main.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
'../src/__stories__/LoopPage.stories.tsx',
55
'../src/**/*.stories.@(ts|tsx|js|jsx|mdx)',
66
],
7+
78
addons: [
89
'@storybook/preset-create-react-app',
910
'@storybook/addon-actions',
@@ -15,12 +16,19 @@ module.exports = {
1516
},
1617
},
1718
],
18-
core: {
19-
builder: 'webpack5'
20-
},
19+
2120
features: {
2221
// Emotion11 quasi compatibility issue with storybook. Disabling feature flag to support emotion11.
2322
// https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#emotion11-quasi-compatibility
2423
emotionAlias: false,
2524
},
25+
26+
framework: {
27+
name: '@storybook/react-webpack5',
28+
options: {}
29+
},
30+
31+
docs: {
32+
autodocs: true
33+
}
2634
};

app/.storybook/preview.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { addDecorator } from '@storybook/react';
2+
import { Preview } from '@storybook/react';
33
import '../src/App.scss';
44
import '../src/i18n';
55
import StoryWrapper from '../src/__stories__/StoryWrapper';
@@ -10,8 +10,18 @@ import StoryWrapper from '../src/__stories__/StoryWrapper';
1010
* - include the theme & store providers
1111
* - use Storybook parameters to customize the width of the wrapper
1212
*/
13-
addDecorator((StoryFn, ctx) => (
14-
<StoryWrapper centered={ctx.parameters.centered} contained={ctx.parameters.contained}>
15-
<StoryFn {...ctx} />
16-
</StoryWrapper>
17-
));
13+
14+
const preview: Preview = {
15+
decorators: [
16+
(StoryFn, ctx) => (
17+
<StoryWrapper
18+
centered={ctx.parameters.centered}
19+
contained={ctx.parameters.contained}
20+
>
21+
<StoryFn {...ctx} />
22+
</StoryWrapper>
23+
),
24+
],
25+
};
26+
27+
export default preview;

app/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"lint": "eslint --ext .ts,.tsx --ignore-path .eslintignore .",
1616
"tsc": "tsc --noEmit",
1717
"protos": "node ./scripts/build-protos.js",
18-
"storybook": "start-storybook -p 9009 -s public",
19-
"build-storybook": "build-storybook -s public"
18+
"storybook": "storybook dev -p 9009 -s public",
19+
"build-storybook": "storybook build -s public"
2020
},
2121
"dependencies": {
2222
"@emotion/react": "11.4.0",
@@ -57,14 +57,13 @@
5757
"styled-components": "5.1.1"
5858
},
5959
"devDependencies": {
60-
"@storybook/addon-actions": "6.5.9",
61-
"@storybook/addon-docs": "6.5.9",
62-
"@storybook/addon-links": "6.5.9",
63-
"@storybook/addons": "6.5.9",
64-
"@storybook/builder-webpack5": "6.5.9",
65-
"@storybook/manager-webpack5": "6.5.9",
66-
"@storybook/preset-create-react-app": "4.1.2",
67-
"@storybook/react": "6.5.9",
60+
"@storybook/addon-actions": "7.5.3",
61+
"@storybook/addon-docs": "7.5.3",
62+
"@storybook/addon-links": "7.5.3",
63+
"@storybook/addons": "7.5.3",
64+
"@storybook/preset-create-react-app": "7.5.3",
65+
"@storybook/react": "7.5.3",
66+
"@storybook/react-webpack5": "7.5.3",
6867
"@testing-library/jest-dom": "5.11.5",
6968
"@testing-library/react": "11.1.1",
7069
"@testing-library/user-event": "12.2.0",
@@ -94,6 +93,7 @@
9493
"jest-environment-jsdom": "27.5.1",
9594
"prettier": "2.1.2",
9695
"sass": "1.43.4",
96+
"storybook": "7.5.3",
9797
"ts-protoc-gen": "0.12.0",
9898
"typescript": "4.1.6",
9999
"webpack": "5.89.0"

0 commit comments

Comments
 (0)