storybook/docs/snippets/react/your-component.js.mdx
2021-06-28 23:00:33 +01:00

22 lines
551 B
Plaintext

```js
// YourComponent.stories.js | YourComponent.stories.jsx
import React from 'react';
import { YourComponent } from './YourComponent';
//👇 This default export determines where your story goes in the story list
export default {
title: 'YourComponent',
component: YourComponent,
};
//👇 We create a “template” of how args map to rendering
const Template = (args) => <YourComponent {...args} />;
export const FirstStory = Template.bind({});
FirstStory.args = {
/*👇 The args you need here will depend on your component */
};
```