mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 08:01:20 +08:00
21 lines
574 B
JavaScript
21 lines
574 B
JavaScript
import { configure, addParameters } from '@storybook/react';
|
|
import { create } from '@storybook/theming/create';
|
|
|
|
addParameters({
|
|
options: {
|
|
theme: create({ colorPrimary: 'hotpink', colorSecondary: 'orangered' }),
|
|
},
|
|
});
|
|
|
|
// test loading function
|
|
const loadFn = () => {
|
|
// place welcome first, test storiesof files
|
|
require('../src/stories/welcome.stories');
|
|
|
|
// test mixtures of storiesof & module files
|
|
const req = require.context('../src/stories', true, /button\.stories\.js$/);
|
|
return req.keys().map(fname => req(fname));
|
|
};
|
|
|
|
configure(loadFn, module);
|