storybook-addon-docgen
Generates documentation using react-docgen
Development
npm install
npm run storybook
Usage
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>
))