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

18 lines
554 B
Plaintext

```md
<!-- YourComponent.stories.mdx -->
import { Meta, Story } from '@storybook/addon-docs';
import { YourComponent } from './YourComponent';
<!--👇 The title prop determines where your story goes in the story list -->
<Meta title="YourComponent" component={YourComponent} />
<!-- Render functions are a framework specific feature to allow you control on how the component renders -->
<!-- 👇 The args you need here will depend on your component -->
<Story
name="FirstStory"
args={{}}
render={(args) => <YourComponent {...args} />} />
```