Generates documentation using react-docgen
# Fork this repo and git clone it
npm install
npm run storybook
Add the addon to your .storybook/addons.js
import '@twostoryrobot/storybook-addon-docgen/register'
Add the docgen
decorator to your stories. You must supply the component you
want the documentation from. In this case we want to docs supplied from the
Button component.
import docgen from '@twostoryrobot/storybook-addon-docgen'
storiesOf('Button', module)
.addDecorator(docgen(Button))
.add('with text', () => (
<Button onClick={action('clicked')}>Hello Button</Button>
))