How to use the @storybook/react.load function in @storybook/react

To help you get started, we’ve selected a few @storybook/react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / storybook / examples / cra-mdx / .storybook / config.js View on Github external
addParameters({
  options: {
    docs: {
      inlineStories: true,
      getPropDefs,
    },
    theme: themes.dark,
  },
  docs: DocsPage,
  notes: 'global notes',
});

// addDecorator(storyFn =&gt; <div style="{{">{storyFn()}</div>);

load(require.context('../src', true, /\.stories\.js$/), module);
load(require.context('../src', true, /\.stories\.mdx$/), module);
github storybookjs / storybook / examples / cra-react15 / .storybook / config.js View on Github external
import { load, addParameters } from '@storybook/react';
import { create } from '@storybook/theming/create';

addParameters({
  options: {
    theme: create({ colorPrimary: 'hotpink', colorSecondary: 'orangered' }),
  },
});

load(require.context('../src/stories', true, /\.stories\.js$/), module);
github Setsun / react-transition-components / .storybook / config.js View on Github external
docs: DocsPage,
  info: {},
  options: {
    theme: themes.dark,
    panelPosition: 'right',
    sidebarAnimations: false,
  }
});

addDecorator(withKnobs);

configure(() => {
  req.keys().forEach(filename => req(filename));
}, module);

load(require.context('../src', true, /\.stories\.mdx$/), module);