No Description

config.js 645B

123456789101112131415161718192021
  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. addParameters({
  7. info: { inline: true },
  8. viewport: {
  9. viewports: INITIAL_VIEWPORTS,
  10. defaultViewport: 'someDefault',
  11. },
  12. });
  13. // automatically import all files ending in *.stories.tsx
  14. configure(
  15. require.context('../stories', true, /\.stories\.tsx?$/), module
  16. )
  17. addDecorator((storyFn, context) => withConsole()(storyFn)(context));
  18. export { getStorybook }