storybook/docs/snippets/react/component-story-mdx-story-by-name.mdx.mdx
2021-10-12 21:52:15 +01:00

19 lines
389 B
Plaintext

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