fbredius/storybook

View on GitHub
docs/snippets/vue/checkbox-story-csf.js.mdx

Summary

Maintainability
Test Coverage
```js
// Checkbox.stories.js

import Checkbox from './Checkbox.vue';

export default {
  /* 👇 The title prop is optional.
  * See https://storybook.js.org/docs/vue/configure/overview#configure-story-loading
  * to learn how to generate automatic titles
  */
  title: 'Checkbox', 
  component: Checkbox,
};

export const allCheckboxes = () => ({
  components: { Checkbox },
  template: `
    <form>
      <Checkbox id="Unchecked" label="Unchecked"/>
      <Checkbox id="Checked" label="Checked" checked />
      <Checkbox appearance="secondary" id="second" label="Secondary" checked />
    </form>`,
});
```