12345678910111213141516171819202122 |
- import { configure, getStorybook } from '@storybook/react';
- import { addParameters } from '@storybook/react';
- import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
- import { addDecorator } from '@storybook/react';
- import { withConsole } from '@storybook/addon-console';
-
- addParameters({
- info: { inline: true },
- viewport: {
- viewports: INITIAL_VIEWPORTS,
- defaultViewport: 'someDefault',
- },
- });
- // automatically import all files ending in *.stories.tsx
- configure(
- require.context('../stories', true, /\.stories\.tsx?$/), module
- )
-
- addDecorator((storyFn, context) => withConsole()(storyFn)(context));
-
- import 'antd/dist/antd.less';
- export { getStorybook }
|