Annotations API for Storybook
Creating Storybook stories with es6 decorators.
API
@storiesOf(storyKind, module)
@add(storyName)
@addDecorator(decorator, [arguments])
build(descriptor)
TBD
Installation
npm i -D storybook-annotations-api
Add babel-plugin-transform-decorators-legacy to your babel configuration for Storybook.
For Example .babelrc
Example
How to run
npm run storybook
Example of the stories file
;;;;; { return <div style=fontSize: 'bold'> </div> } @@@@ @ { return <div></div> ; } @ { return <span>span</span> ; } @ { return <section>section</section> ; } @ @ @ { return <a>anchor</a> ; } @ @ @ { return <table> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>a</td> <td>b</td> <td>c</td> </tr> </table> ; } ;