redux-devtools/packages/devui/.storybook/config.js

29 lines
811 B
JavaScript
Raw Normal View History

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-09 02:08:34 +03:00
addDecorator(withOptions({
2019-01-03 16:00:55 +03:00
name: 'DevUI',
url: 'https://github.com/reduxjs/redux-devtools/tree/master/packages/devui',
goFullScreen: false,
2019-01-09 02:08:34 +03:00
showStoriesPanel: true,
showAddonPanel: true,
2019-01-03 16:00:55 +03:00
showSearchBox: false,
2019-01-09 02:08:34 +03:00
addonPanelInRight: true
}));
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() {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);