2016-12-15 04:21:31 +11:00
|
|
|
import { configure, setAddon } from '@kadira/storybook';
|
|
|
|
import IntlAddon from 'react-storybook-addon-intl';
|
2016-10-11 12:21:06 +11:00
|
|
|
import React from 'react';
|
|
|
|
import { storiesOf, action } from '@kadira/storybook';
|
2016-12-15 04:21:31 +11:00
|
|
|
import { addLocaleData } from 'react-intl';
|
|
|
|
import en from 'react-intl/locale-data/en';
|
2017-05-13 23:55:56 +10:00
|
|
|
import '../app/javascript/styles/application.scss';
|
|
|
|
import './storybook.scss';
|
2016-10-11 12:21:06 +11:00
|
|
|
|
2016-12-15 04:21:31 +11:00
|
|
|
setAddon(IntlAddon);
|
|
|
|
addLocaleData(en);
|
2016-10-11 13:07:32 +11:00
|
|
|
|
2017-05-13 23:55:56 +10:00
|
|
|
let req = require.context('./stories/', true, /.story.js$/);
|
2017-04-19 00:04:35 +10:00
|
|
|
|
2016-10-11 12:21:06 +11:00
|
|
|
function loadStories () {
|
2017-05-21 01:31:47 +10:00
|
|
|
req.keys().forEach((filename) => req(filename));
|
2016-10-11 12:21:06 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(loadStories, module);
|