No Description

config.js 731B

12345678910111213141516171819202122232425
  1. import { configure, getStorybook } from '@storybook/react';
  2. import { addParameters } from '@storybook/react';
  3. import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
  4. import { addDecorator } from '@storybook/react';
  5. import { withConsole } from '@storybook/addon-console';
  6. import theme from './theme';
  7. import 'antd/dist/antd.less';
  8. addParameters({
  9. info: { inline: true },
  10. viewport: {
  11. viewports: INITIAL_VIEWPORTS,
  12. defaultViewport: 'someDefault',
  13. },
  14. options: { theme },
  15. });
  16. // automatically import all files ending in *.stories.tsx
  17. configure(
  18. require.context('../stories', true, /\.stories\.(t|j)sx?$/), module
  19. )
  20. addDecorator((storyFn, context) => withConsole()(storyFn)(context));
  21. export { getStorybook }