@storybook/react#addDecorator TypeScript Examples

The following examples show how to use @storybook/react#addDecorator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: preview.tsx    From lightning-terminal with MIT License 6 votes vote down vote up
/**
 * adds a common wrapper component around all stories to:
 *  - set the background color
 *  - include the theme & store providers
 *  - use Storybook parameters to customize the width of the wrapper
 */
addDecorator((StoryFn, ctx) => (
  <StoryWrapper centered={ctx.parameters.centered} contained={ctx.parameters.contained}>
    <StoryFn {...ctx} />
  </StoryWrapper>
));
Example #2
Source File: preview.tsx    From ant-extensions with MIT License 5 votes vote down vote up
addDecorator(withContexts(contexts));
Example #3
Source File: preview.tsx    From ant-extensions with MIT License 5 votes vote down vote up
addDecorator(withTests({ results }));
Example #4
Source File: preview.tsx    From storefront with MIT License 5 votes vote down vote up
addDecorator(withNextRouter());
Example #5
Source File: preview.tsx    From storefront with MIT License 5 votes vote down vote up
addDecorator(withThemeProvider);
Example #6
Source File: config.ts    From substrate-api-explorer with Apache License 2.0 5 votes vote down vote up
// Apply decorators
addDecorator(withKnobs)
Example #7
Source File: config.ts    From substrate-api-explorer with Apache License 2.0 5 votes vote down vote up
addDecorator(withA11y)
Example #8
Source File: config.ts    From substrate-api-explorer with Apache License 2.0 5 votes vote down vote up
addDecorator(withPropsTable)
Example #9
Source File: config.tsx    From natds-rn with ISC License 5 votes vote down vote up
addDecorator(withTheme);
Example #10
Source File: config.tsx    From natds-rn with ISC License 5 votes vote down vote up
addDecorator(
  withKnobs({
    escapeHTML: false,
  }),
);
Example #11
Source File: preview.ts    From grafana-chinese with Apache License 2.0 5 votes vote down vote up
addDecorator(withTheme(handleThemeChange));
Example #12
Source File: preview.ts    From grafana-chinese with Apache License 2.0 5 votes vote down vote up
addDecorator(withKnobs);
Example #13
Source File: preview.ts    From grafana-chinese with Apache License 2.0 5 votes vote down vote up
addDecorator(withPaddedStory);