storybook/docs/snippets/svelte/component-story-mdx-story-by-name.mdx.mdx
2022-07-07 19:15:02 +01:00

23 lines
510 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.
See https://storybook.js.org/docs/7.0/svelte/api/csf
to learn how to use render functions.
-->
<Story
name="Basic"
args={{ label: 'hello' }}
render={(args) => ({
Component: Button,
props: args,
})} />
```