Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add props details to Storybook with withInfo #29

Open
olivierobert opened this issue Jan 23, 2018 · 0 comments
Open

Add props details to Storybook with withInfo #29

olivierobert opened this issue Jan 23, 2018 · 0 comments

Comments

@olivierobert
Copy link

Consider, wrapping the component with withInfo to add the prop details to the components:

storybook

Here is an example:

storiesOf('Button', module)
  .addDecorator(story => (
    <div style={{ padding: '1rem' }}>{story()}</div>
  ))
  .add('Displays a simple text in a default button', withInfo()(() => <Button text="Button"/>))

withinfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant