We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4766db5 commit 784afa8Copy full SHA for 784afa8
.storybook/config.js
@@ -12,8 +12,15 @@ const CenterDecorator = storyFn => (
12
</div>
13
);
14
15
-addDecorator(CenterDecorator);
+// reset the window on each story
16
+const withWindowReset = storyFn => {
17
+ window.scrollTo(0, 0);
18
+ return storyFn();
19
+};
20
+
21
addDecorator(withKnobs);
22
+addDecorator(withWindowReset);
23
+addDecorator(CenterDecorator);
24
25
const req = require.context('../stories', true, /\.stories\.js$/);
26
0 commit comments