AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 1 | import React from 'react'; |
| 2 | import {configure, addDecorator} from '@kadira/storybook'; |
| 3 | import {withKnobs} from '@kadira/storybook-addon-knobs'; |
| 4 | import { setOptions } from '@kadira/storybook-addon-options'; |
| 5 | import './storybook.scss'; |
| 6 | import '../resources/scss/onboarding.scss'; |
| 7 | |
| 8 | |
| 9 | const req = require.context('../src', true, /.stories.js$/) |
| 10 | const namespaceDecorator = (story) => ( |
| 11 | <div className='dox-ui'> |
| 12 | {story()} |
| 13 | </div> |
| 14 | ); |
| 15 | |
| 16 | addDecorator(namespaceDecorator); |
| 17 | |
| 18 | setOptions({ |
| 19 | name: 'custom', |
| 20 | downPanelInRight: true |
| 21 | }); |
| 22 | |
| 23 | function loadStories() { |
| 24 | req.keys().forEach((filename) => req(filename)) |
| 25 | } |
| 26 | |
| 27 | configure(loadStories, module); |