Closed nogizhopaboroda closed 6 years ago
This pr brings ability to write stories as functions and easy way to use modulor-html. The change is backward-compatible
modulor-html
example stories:
const buttonIsDisabled = true; storiesOf('Button') .add('default', () => html` <button disabled="${buttonIsDisabled}">click me</button> `)
storiesOf('Button') .add('default', () => (container) => { const element = document.createElement('button'); element.addEventListener('click', () => { ... }); container.appendChild(element); })
@pankajpatel @nvignola could you pls check in your project?
added a commit to try out example. Works out well, so added it the README as well.
Looks good for me too
i'm merging then?
Yep
This pr brings ability to write stories as functions and easy way to use
modulor-html
. The change is backward-compatibleexample stories: