Skip to content

Commit

Permalink
Reproduced storybookjs#894
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed May 31, 2017
1 parent 585becc commit 2aceedc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/test-cra/.storybook/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script type="text/javascript">
window.foo = 'bar';
</script>
4 changes: 4 additions & 0 deletions examples/test-cra/src/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import Button from './Button';
import Welcome from './Welcome';
import ComponentWithRef from './ComponentWithRef';

if (window.foo !== 'bar') {
throw new Error('`head.html` was not included!');
}

storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);

storiesOf('Button', module)
Expand Down

0 comments on commit 2aceedc

Please sign in to comment.