Guest User

Untitled

a guest
Oct 20th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import { addDecorator } from '@storybook/react';
  2. import React from 'react';
  3.  
  4. import GlobalStyles from 'path/to/global/styles/component';
  5.  
  6. function withGlobalStyles(storyFn) {
  7. return (
  8. <React.Fragment>
  9. <GlobalStyles />
  10. {storyFn()}
  11. </React.Fragment>
  12. );
  13. }
  14.  
  15. addDecorator(withGlobalStyles);
Add Comment
Please, Sign In to add comment