fbredius/storybook

View on GitHub
docs/snippets/web-components/your-component.js.mdx

Summary

Maintainability
Test Coverage
```js
// your-component.stories.js

import { html } from 'lit-html';

import './your-component';

// This default export determines where your story goes in the story list
export default {
  title: 'YourComponent',
};

// 👇 We create a “template” of how args map to rendering
const Template = ({ aProperty }) => html`<your-component .yourProperty=${aProperty}></your-component>`;

export const FirstStory = Template.bind({});

FirstStory.args = {
  /* 👇 The args you need here will depend on your component */
  aProperty: 'aProperty'
};
```