How to use storybook-host - 6 common examples

To help you get started, we’ve selected a few storybook-host 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 kleros / doges-on-trial / .storybook / config.js View on Github external
import { configure, addDecorator } from '@storybook/react'
import { host } from 'storybook-host'
import { combineReducers, createStore } from 'redux'
import { Provider } from 'react-redux'
import { MemoryRouter } from 'react-router-dom'

import modal from '../src/reducers/modal'
import GlobalComponents from '../src/bootstrap/global-components'

import '../src/bootstrap/fontawesome'

import '../src/bootstrap/app.css'

// Storybook Host
addDecorator(
  host({
    title: 'Doges on Trial UI-Kit',
    align: 'center middle'
  })
)

// Integration Wrapper
const store = createStore(combineReducers({ modal }))
addDecorator(story => (
  
    <div>
      {story()}
      
    </div>
  
))
github flow-typed / flow-typed / definitions / npm / storybook-host_v4.x.x / flow_v0.54.1- / test_storybook-host_v4.x.x.js View on Github external
it("should validate on default usage", () =&gt; {
    storiesOf("button", module)
      .addDecorator(host({}))
      .add("", () =&gt; <div>);
  });
</div>
github timothyarmes / ta-meteor-apollo-starter-kit / app / ui / components / dumb / loadable-wrapper / stories.js View on Github external
import React from 'react';
import { storiesOf } from '@storybook/react';
import { host } from 'storybook-host';
import LoadableWrapper from './index';

storiesOf('LoadableWrapper', module)
  .addDecorator(host({
    align: 'center middle',
    width: '60%',
  }))
  .add('Component', () =&gt; (
    Component}
    /&gt;
  ));
github timothyarmes / ta-meteor-apollo-starter-kit / app / ui / components / dumb / title / stories.js View on Github external
import React from 'react';
import { storiesOf } from '@storybook/react';
import { host } from 'storybook-host';
import Title from './index';

storiesOf('Title', module)
  .addDecorator(host({
    align: 'center middle',
    width: '60%',
  }))
  .add('Title', () =&gt; (
    <title>
      I'm the Title
    </title>
  ));
github timothyarmes / ta-meteor-apollo-starter-kit / app / ui / components / dumb / loading / stories.js View on Github external
import React from 'react';
import { storiesOf } from '@storybook/react';
import { host } from 'storybook-host';
import Loading from './index';

storiesOf('Loading', module)
  .addDecorator(host({
    align: 'center middle',
    width: '60%',
  }))
  .add('Loading', () =&gt; (
    
  ));
github timothyarmes / ta-meteor-apollo-starter-kit / app / ui / components / dumb / label / stories.js View on Github external
import React from 'react';
import { storiesOf } from '@storybook/react';
import { host } from 'storybook-host';
import Label from './index';

storiesOf('Label', module)
  .addDecorator(host({
    align: 'center middle',
    width: '60%',
  }))
  .add('Label', () =&gt; (
    <label>I am a label</label>
  ));

storybook-host

A React Storybook decorator with helpful display options for hosting components under test

MIT
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis

Popular storybook-host functions