How to use the @open-wc/storybook.document.createElement function in @open-wc/storybook

To help you get started, we’ve selected a few @open-wc/storybook examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github open-wc / open-wc / packages / generator-open-wc / generators / scaffold-demoing / templates / static / stories / example.stories.js View on Github external
.add('document.createElement', () => {
    const el = document.createElement('button');
    el.innerText = 'click me';
    el.foo = 'bar';
    el.addEventListener('click', e => alert(e.target.foo));
    return el;
  })
  .add('lit-html', () => html`

@open-wc/storybook

Storybook configuration following open-wc recommendations

MIT
Latest version published 6 years ago

Package Health Score

64 / 100
Full package analysis

Similar packages