Skip to content

Instantly share code, notes, and snippets.

@raibima
Last active July 27, 2019 14:29
Show Gist options
  • Select an option

  • Save raibima/1045cca203eb46e210d33d8cfad20d69 to your computer and use it in GitHub Desktop.

Select an option

Save raibima/1045cca203eb46e210d33d8cfad20d69 to your computer and use it in GitHub Desktop.
import React from 'react';
import { text } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import HelloWorld from './HelloWorld';
const DECORATOR = renderStory => (
<React.Fragment>{renderStory()}</React.Fragment>
);
const DO_NOT_GENERATE_PROP_TABLES = [
React.Fragment,
];
const DESCRIPTION = `
HelloWorld
---
Commodo aliqua enim proident ex in eiusmod incididunt magna officia labore amet.
`
storiesOf('HelloWorld', module)
.addDecorator(DECORATOR)
.addParameters({
info: {
text: DESCRIPTION,
propTablesExclude: DO_NOT_GENERATE_PROP_TABLES,
},
})
.add('default', () => <HelloWorld text={text('text', 'HelloWorld')} />);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment