Skip to content

Commit 1e63a30

Browse files
committed
upgrade storybook
1 parent decca16 commit 1e63a30

File tree

5 files changed

+2955
-3052
lines changed

5 files changed

+2955
-3052
lines changed

.storybook/config.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

.storybook/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
stories: ['../stories/**/*.stories.js'],
3+
};

.storybook/preview.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { withKnobs } from '@storybook/addon-knobs';
2+
3+
// reset the window on each story
4+
const withWindowReset = (storyFn) => {
5+
window.scrollTo(0, 0);
6+
return storyFn();
7+
};
8+
9+
export const decorators = [withKnobs, withWindowReset];

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
"peerDependencies": {
6262
"react": ">=17.0.1",
63-
"react-dom": ">=17.0.1"
63+
"react-dom": ">=17.0.1"
6464
},
6565
"devDependencies": {
6666
"@babel/cli": "^7.0.0",
@@ -69,11 +69,11 @@
6969
"@babel/plugin-proposal-export-default-from": "^7.0.0",
7070
"@babel/preset-env": "^7.0.0",
7171
"@babel/preset-react": "^7.0.0",
72-
"@storybook/addon-actions": "^5.0.6",
73-
"@storybook/addon-knobs": "^5.0.6",
74-
"@storybook/addon-links": "^5.0.6",
75-
"@storybook/addons": "^5.0.6",
76-
"@storybook/react": "^5.0.6",
72+
"@storybook/addon-actions": "^6.2.9",
73+
"@storybook/addon-knobs": "^6.2.9",
74+
"@storybook/addon-links": "^6.2.9",
75+
"@storybook/addons": "^6.2.9",
76+
"@storybook/react": "^6.2.9",
7777
"@types/jest": "^24.0.11",
7878
"@types/react": "^17.0.1",
7979
"babel-core": "^7.0.0-bridge.0",

0 commit comments

Comments
 (0)