You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
564 B
22 lines
564 B
import React from 'react'
|
|
import { configure, addDecorator } from '@storybook/react'
|
|
import { withKnobs } from '@storybook/addon-knobs'
|
|
import { ThemeProvider } from 'styled-components'
|
|
|
|
import 'styles/global'
|
|
import theme from 'styles/theme'
|
|
|
|
const req = require.context('../src', true, /.stories.js$/)
|
|
function loadStories() {
|
|
req.keys().forEach(filename => req(filename))
|
|
}
|
|
|
|
addDecorator(story => (
|
|
<ThemeProvider theme={theme}>
|
|
<div style={{ padding: 20 }}>{story()}</div>
|
|
</ThemeProvider>
|
|
))
|
|
|
|
addDecorator(withKnobs)
|
|
|
|
configure(loadStories, module)
|
|
|