fbredius/storybook

View on GitHub
docs/snippets/web-components/button-story-decorator.js.mdx

Summary

Maintainability
Test Coverage
```js
// demo-button.stories.js

import { html } from 'lit-html';

import './demo-button'; 

export default {
    title: 'Button',
};

export const Primary = () => html`<demo-button>Hello World</demo-button>`;

Primary.decorators = [(story) => html`<div style="margin: 3em">${story()}</div>`]
```