How to use @storybook/addon-centered - 3 common examples

To help you get started, we’ve selected a few @storybook/addon-centered 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 RocketChat / Rocket.Chat.Livechat / src / components / Menu / stories.js View on Github external
const centeredWithPopoverContainer = (storyFn, ...args) => (
	<div style="{{">
		
			{centered(storyFn, ...args)}
		
	</div>
);
github RocketChat / Rocket.Chat.Livechat / src / components / Popover / stories.js View on Github external
const centeredWithPopoverContainer = (storyFn, ...args) =&gt; (
	<div style="{{">
		
			{centered(storyFn, ...args)}
		
	</div>
);
github decentraland / ui / .storybook / config.js View on Github external
const { configure, addDecorator } = require('@storybook/react')
const centered = require('@storybook/addon-centered').default
const { withOptions } = require('@storybook/addon-options')

let themeSwitcher
let darkTheme
let lightTheme
if (process.env.NODE_ENV !== 'test') {
  themeSwitcher = require('../addons/themes').default
  darkTheme = require('../src/themes/alternative/dark-theme.css')
  lightTheme = require('../src/themes/alternative/light-theme.css')
}

addDecorator(
  withOptions({
    name: 'decentraland-ui',
    url: 'https://github.com/decentraland/ui',
    goFullScreen: false,

@storybook/addon-centered

Storybook decorator to center components

MIT
Latest version published 4 years ago

Package Health Score

78 / 100
Full package analysis

Popular @storybook/addon-centered functions