diff --git a/ui/.storybook/config.js b/ui/.storybook/config.js index bb888c3a..76294912 100644 --- a/ui/.storybook/config.js +++ b/ui/.storybook/config.js @@ -1,6 +1,35 @@ -const { configure } = require('@kadira/storybook'); +const React = require('react'); +const { configure, addDecorator } = require('@kadira/storybook'); -const req = require.context('../src/components', true, /story.js$/) +const req = require.context('../src/components', true, /story.js$/); + +const Styled = require('styled-components'); +const Base = require('../src/components/base'); + +const { + injectGlobal +} = Styled; + +class StyledDecorator extends React.Component { + componentWillMount() { + injectGlobal` + ${Base.global} + `; + } + render() { + return ( + + {this.props.children} + + ) + } +} + +addDecorator((story) => ( + + {story()} + +)); function loadStories() { let stories = req.keys();