How to use happo-plugin-storybook - 1 common examples

To help you get started, we’ve selected a few happo-plugin-storybook 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 airbnb / lunar / .storybook / config.js View on Github external
import './bootstrap';
import React from 'react';
import { setDefaultDelay } from 'happo-plugin-storybook/register';
import { addDecorator, configure } from '@storybook/react';
import { withContexts } from '@storybook/addon-contexts/react';
import { withA11y } from '@storybook/addon-a11y';
import { withProps } from './addons/props';
import { withStory } from './addons/story';
import contexts from './contexts';

global.action = key => (...args) => console.log(key, ...args);

setDefaultDelay(100);

addDecorator(story => (
  <div style="{{">
    {story()}
  </div>
));
addDecorator(withA11y);
addDecorator(withProps);
addDecorator(withStory);
addDecorator(withContexts(contexts));

configure(require.context('../packages', true, /\/([A-Za-z0-9]+\.)?story\.tsx?$/), module);

happo-plugin-storybook

A happo.io plugin for projects using Storybook

MIT
Latest version published 14 days ago

Package Health Score

63 / 100
Full package analysis

Popular happo-plugin-storybook functions