@storybook/react#addDecorator JavaScript 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.js    From lundium with MIT License 6 votes vote down vote up
addDecorator(story => (
	<ThemeProvider
		theme={{
			isRTL: boolean('isRTL', false),
			locale: en_US,
		}}
	>
		<div style={{ display: 'flex', justifyContent: 'center' }}>
			<HtmlDirection />
			{story()}
		</div>
	</ThemeProvider>
));
Example #2
Source File: config.js    From create-gatsby-web with MIT License 5 votes vote down vote up
addDecorator(withKnobs)
Example #3
Source File: preview.js    From polaris with Apache License 2.0 5 votes vote down vote up
addDecorator(centered);
Example #4
Source File: preview.js    From blade with MIT License 5 votes vote down vote up
addDecorator(withKnobs);
Example #5
Source File: preview.js    From blade with MIT License 5 votes vote down vote up
addDecorator((Story) => (
  <ThemeProvider theme={theme}>
    <Story />
  </ThemeProvider>
));
Example #6
Source File: config.js    From greater-gatsby with MIT License 5 votes vote down vote up
addDecorator(withGlobalStyles)
Example #7
Source File: preview.js    From Webiu with MIT License 5 votes vote down vote up
addDecorator(story => <ThemeProvider theme={theme}>{story()}</ThemeProvider>)
Example #8
Source File: preview.js    From twitter-frontend with GNU General Public License v3.0 5 votes vote down vote up
addDecorator(story => <MemoryRouter initialEntries={['/']}>{story()}</MemoryRouter>);
Example #9
Source File: config.js    From create-gatsby-web with MIT License 5 votes vote down vote up
addDecorator(withInfo)
Example #10
Source File: config.js    From create-gatsby-web with MIT License 5 votes vote down vote up
addDecorator(withA11y)
Example #11
Source File: preview.js    From material-ui-color with MIT License 5 votes vote down vote up
addDecorator(storyFn => <div style={{ padding: '48px' }}>{storyFn()}</div>);
Example #12
Source File: config.js    From create-gatsby-web with MIT License 5 votes vote down vote up
addDecorator(withInfo)
Example #13
Source File: config.js    From create-gatsby-web with MIT License 5 votes vote down vote up
addDecorator(withA11y)
Example #14
Source File: config.js    From create-gatsby-web with MIT License 5 votes vote down vote up
addDecorator(withKnobs)
Example #15
Source File: preview.js    From project-s0-t1-budget with MIT License 5 votes vote down vote up
addDecorator(withA11y);
Example #16
Source File: preview.js    From project-s0-t1-budget with MIT License 5 votes vote down vote up
addDecorator(withKnobs);
Example #17
Source File: preview.js    From virtuoso-design-system with MIT License 5 votes vote down vote up
addDecorator(withA11y);
Example #18
Source File: preview.js    From virtuoso-design-system with MIT License 5 votes vote down vote up
addDecorator(Story => (
  <div className={styles.container}>
    <Story />
  </div>
));
Example #19
Source File: preview.js    From virtuoso-design-system with MIT License 5 votes vote down vote up
addDecorator(StoryRouter());
Example #20
Source File: preview.js    From virtuoso-design-system with MIT License 5 votes vote down vote up
addDecorator(withKnobs);
Example #21
Source File: config.js    From wix-style-react with MIT License 5 votes vote down vote up
// Decorators
addDecorator(withI18n);
Example #22
Source File: config.js    From website with Apache License 2.0 5 votes vote down vote up
addDecorator(
  withInfo({
    inline: true,
  }),
)
Example #23
Source File: preview.js    From community-front-end with MIT License 5 votes vote down vote up
addDecorator((storyFn) => (
  <ModalContext.Provider value={{ handleComponentVisible }}>
    {storyFn()}
  </ModalContext.Provider>
))
Example #24
Source File: config.js    From surveillance-forms with MIT License 5 votes vote down vote up
function loadStories() {
  addDecorator(CenterDecorator);
  req.keys().sort().forEach(filename => req(filename));
}
Example #25
Source File: preview.js    From Edlib with GNU General Public License v3.0 5 votes vote down vote up
addDecorator((story) => (
    <MemoryRouter initialEntries={['/']}>{story()}</MemoryRouter>
));
Example #26
Source File: preview.js    From Edlib with GNU General Public License v3.0 5 votes vote down vote up
addDecorator((storyFn) => <div>{storyFn()}</div>);
Example #27
Source File: preview.js    From Edlib with GNU General Public License v3.0 5 votes vote down vote up
addDecorator((storyFn) => <div style={{ padding: 20 }}>{storyFn()}</div>);
Example #28
Source File: preview.js    From neu_ui with MIT License 5 votes vote down vote up
addDecorator((story) => (
  <>
    <GlobalStyle />
    {story()}
  </>
));
Example #29
Source File: config.js    From wix-style-react with MIT License 5 votes vote down vote up
// Decorators
addDecorator(withI18n);