storybook/docs/snippets/vue/checkbox-story-starter-example.mdx.mdx

29 lines
710 B
Plaintext

```md
<!-- Checkbox.stories.mdx -->
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import Checkbox from './Checkbox.vue';
<Meta title="MDX/Checkbox" component={Checkbox} />
# Checkbox
With `MDX`, we can define a story for `Checkbox` right in the middle of our Markdown documentation.
<Canvas>
<Story name="all checkboxes">
{() => {
return {
components: { Checkbox },
template: `
<form>
<Checkbox id="Unchecked" label="Unchecked" />
<Checkbox id="Checked" label="Checked" checked />
<Checkbox appearance="secondary" id="second" label="Secondary" checked />
</form>`,
};
}}
</Story>
</Canvas>
```