Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-storybook-addon-add-stories-group

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-storybook-addon-add-stories-group

A React Storybook addon to show add groups of stories and show them all toghether.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Storybook Info Addon

A React Storybook addon to show additional information for your stories.

React Storybook Screenshot

Usage

Install the following npm module:

npm i --save-dev react-storybook-addon-add-stories-group

import { configure,setAddon } from '@kadira/storybook';
import addStoriesGroup from 'react-storybook-addon-add-stories-group'

setAddon(addStoriesGroup)

function loadStories() {
  require('../src/components/stories/MyComp');
  // require as many stories as you need.
}

configure(loadStories, module);

Then create your stories with the .addWithInfo API.

import { action , storiesOf} from '@kadira/storybook';
import MyComp from '../MyComp';

const stories = [
  {
    name:"with text" ,
    props: {text:"super error props", resetErrorMessage: action('clicked!') }
  },
  {
    name:"with very long text",
    props: {text:"super error this is a reaaaaaalllly long error, probably more than one line of text, even if you have a huge monitor, text text", resetErrorMessage: action('clicked!') }
  }
]

storiesOf('MyComp', module)
  .addStoriesGroup(MyComp, stories)

Have a look at this example stories to learn more about the addWithInfo API.

FAQs

Package last updated on 21 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc