-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfig.js
34 lines (28 loc) · 861 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { configure, addDecorator, setAddon } from '@storybook/react';
import infoAddon, { setDefaults } from '@storybook/addon-info';
import { setOptions } from '@storybook/addon-options';
import centered from './decorator-centered';
// TODO: remove it when react-svg-morph is ready
require('react').PropTypes = require('prop-types');
// addon-info
setDefaults({
inline: true,
});
const context = require.context('../src/', true, /\.example\.js$/);
setAddon(infoAddon);
addDecorator(centered);
setOptions({
name: 'MCS Lite',
url: 'https://github.com/MCS-Lite/mcs-lite',
goFullScreen: false,
showStoriesPanel: true,
showAddonPanel: false,
showSearchBox: false,
addonPanelInRight: false,
sortStoriesByKind: true,
sidebarAnimations: false,
});
function loadStories() {
context.keys().forEach(context);
}
configure(loadStories, module);