fbredius/storybook

View on GitHub
docs/snippets/web-components/button-story-component-args-primary.js.mdx

Summary

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

import { html } from 'lit-html';

import './demo-button';

export default {
  title: 'Button',
  //👇 Creates specific argTypes
  argTypes: {
    backgroundColor: { control: 'color' },
  },
  args: {
    //👇 Now all Button stories will be primary.
    primary: true,
  },
};

export const Primary = ({ primary }) => html`<demo-button ?primary=${primary}></demo-button>`;
```