forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
16 lines (13 loc) · 573 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import {configure, addParameters} from '@storybook/react';
import theme from './theme.js';
// automatically import all files ending in *.stories.js
const reqComponents = require.context('../components', true, /\.stories\.(js|jsx|ts|tsx)?$/);
const reqCommon = require.context('../storybook', true, /\.stories\.(js|jsx|ts|tsx)?$/);
function loadStories() {
reqComponents.keys().forEach((filename) => reqComponents(filename));
reqCommon.keys().forEach((filename) => reqCommon(filename));
}
addParameters({
options: {theme},
});
configure(loadStories, module);