0.0.4 • Published 7 years ago

storybook-groups v0.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Storybook Groups

Add groups to the react storybook

Install

$ npm i storybook-groups

Example

import {addGroups, Group} from "storybook-groups"

storiesOf('Button', module)
    .add('with text', () => (
        <Group name="buttons">
            <Button onClick={action('clicked')}>Hello Button</Button>
        </Group>
    ))

addGroups(storiesOf, module, getStorybook)

With knobs example

import {withGroups, Groups} from "storybook-groups"

const stories = storiesOf('Storybook Knobs', module);

stories.addDecorator(withKnobs);
stories.addDecorator(withGroups);

stories.add('with a button 1-button1', () => (

  <button >
{text('Button1', 'Hello Button 1')}
  </button>

))

stories.add('All', () => ( <Groups/> ))

button1 is group name

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago