How to use the @storybook/addon-centered.default function in @storybook/addon-centered

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 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