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

31 lines
834 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-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,
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() {
req.keys().forEach((filename) => req(filename));
2019-01-03 16:00:55 +03:00
}
configure(loadStories, module);