2016-12-14 19:21:31 +02:00
|
|
|
import { configure, setAddon } from '@kadira/storybook';
|
|
|
|
import IntlAddon from 'react-storybook-addon-intl';
|
2016-10-11 04:21:06 +03:00
|
|
|
import React from 'react';
|
|
|
|
import { storiesOf, action } from '@kadira/storybook';
|
2016-12-14 19:21:31 +02:00
|
|
|
import { addLocaleData } from 'react-intl';
|
|
|
|
import en from 'react-intl/locale-data/en';
|
|
|
|
import '../app/assets/stylesheets/components.scss'
|
|
|
|
import './storybook.scss'
|
2016-10-11 04:21:06 +03:00
|
|
|
|
2016-12-14 19:21:31 +02:00
|
|
|
setAddon(IntlAddon);
|
|
|
|
addLocaleData(en);
|
2016-10-11 05:07:32 +03:00
|
|
|
|
2016-10-11 04:21:06 +03:00
|
|
|
window.storiesOf = storiesOf;
|
2016-10-12 13:08:57 +03:00
|
|
|
window.action = action;
|
|
|
|
window.React = React;
|
2016-10-11 04:21:06 +03:00
|
|
|
|
2017-04-18 17:04:35 +03:00
|
|
|
let req = require.context('./stories/', true, /.story.jsx$/);
|
|
|
|
|
2016-10-11 04:21:06 +03:00
|
|
|
function loadStories () {
|
2017-04-18 17:04:35 +03:00
|
|
|
req.keys().forEach((filename) => req(filename))
|
2016-10-11 04:21:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(loadStories, module);
|