2019-06-03 11:06:42 -07:00

21 lines
659 B
JavaScript

import { configure, addDecorator, addParameters } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { withA11y } from '@storybook/addon-a11y';
addDecorator(withA11y);
addParameters({
options: {
brandTitle: 'CRA TypeScript Kitchen Sink',
brandUrl: 'https://github.com/storybookjs/storybook/tree/master/examples/cra-ts-kitchen-sink',
},
});
addDecorator(withInfo());
function loadStories() {
// automatically import all story js files that end with *.stories.tsx
const req = require.context('../src', true, /\.stories\.tsx$/);
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);