Adolfo Panizo d2b5131c9e
WA-279 - Create safe in a three step process (#11)
* WA-279 Creating Stepper component for simulating a Wizard Form with multiple steps

* WA-279 Introduced a review middle step when creating a new Safe

* WA-279 Added more Layout components (Bold, Span, GnoForm...)

* WA-279 Added validation to final-form's create safe form, including isEthAddress validator to form's owners addresses

* WA-279 Updated storybook Header and Footer
2018-03-29 11:52:58 +02:00

36 lines
1.1 KiB
JavaScript

import 'babel-polyfill'
import { addDecorator, configure } from '@storybook/react'
import { withKnobs } from '@storybook/addon-knobs'
import { MuiThemeProvider } from 'material-ui/styles'
import * as React from 'react'
import { Provider } from 'react-redux'
import StoryRouter from 'storybook-router'
import { store } from '~/store'
import theme from '~/theme/mui'
import 'index.scss'
(function (global) {
//Useful for adding data and libraries to window object.
})(typeof window !== 'undefined' ? window : {});
addDecorator(withKnobs);
addDecorator(StoryRouter())
addDecorator((story) => (
<Provider store={store}>
<MuiThemeProvider theme={theme}>
{ story() }
</MuiThemeProvider>
</Provider>
))
const components = require.context('../src/components', true, /\.stories\.((js|ts)x?)$/)
const routes = require.context('../src/routes', true, /\.stories\.((js|ts)x?)$/)
function loadStories() {
components.keys().forEach((filename) => components(filename))
routes.keys().forEach((filename) => routes(filename))
}
configure(loadStories, module)