storybook/docs/snippets/svelte/button-story-with-args.mdx.mdx

23 lines
437 B
Plaintext

```md
<!-- Button.stories.mdx -->
import { Meta, Story } from '@storybook/addon-docs';
import Button from './Button.svelte';
<Meta title="Button" component={Button} />
<!-- Render functions are a framework specific feature to allow you control on how the component renders -->
<Story
name="Primary"
args={{
primary: true,
label: 'Button',
}}
render={(args) => ({
Component: Button,
props: args,
})} />
```