storybook/docs/snippets/common/checkbox-story-starter-example.mdx.mdx
2020-10-07 12:23:34 +08:00

24 lines
656 B
Plaintext

```md
<!--- Checkbox.stories.mdx --->
<!--- This is your Story template function, shown here in React -->
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
import { Checkbox } from './Checkbox';
<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">
<form>
<Checkbox id="Unchecked" label="Unchecked" />
<Checkbox id="Checked" label="Checked" checked />
<Checkbox appearance="secondary" id="second" label="Secondary" checked />
</form>
</Story>
</Canvas>
```