2019-01-03 16:00:55 +03:00
|
|
|
import { configure, setAddon, addDecorator } from '@storybook/react';
|
2019-01-09 02:08:34 +03:00
|
|
|
import { withOptions } from '@storybook/addon-options';
|
|
|
|
import { withInfo } from '@storybook/addon-info';
|
2019-01-03 16:00:55 +03:00
|
|
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
|
|
import { withTheme } from './themeAddon/theme';
|
|
|
|
import '../src/presets.js';
|
|
|
|
|
2019-01-10 21:51:14 +03:00
|
|
|
addDecorator(
|
|
|
|
withOptions({
|
|
|
|
name: 'DevUI',
|
|
|
|
url: 'https://github.com/reduxjs/redux-devtools/tree/master/packages/devui',
|
|
|
|
goFullScreen: false,
|
|
|
|
showStoriesPanel: true,
|
|
|
|
showAddonPanel: true,
|
|
|
|
showSearchBox: false,
|
2020-08-08 23:26:39 +03:00
|
|
|
addonPanelInRight: true,
|
2019-01-10 21:51:14 +03:00
|
|
|
})
|
|
|
|
);
|
2019-01-03 16:00:55 +03:00
|
|
|
|
|
|
|
addDecorator(withTheme);
|
|
|
|
addDecorator(withKnobs);
|
2019-01-09 02:08:34 +03:00
|
|
|
addDecorator(withInfo);
|
2019-01-03 16:00:55 +03:00
|
|
|
|
|
|
|
const req = require.context('../src/', true, /stories\/index\.js$/);
|
|
|
|
|
|
|
|
function loadStories() {
|
2020-08-08 23:26:39 +03:00
|
|
|
req.keys().forEach((filename) => req(filename));
|
2019-01-03 16:00:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(loadStories, module);
|