storybook/docs/snippets/react/my-component-story-basic-and-props.js.mdx
2021-06-28 23:00:33 +01:00

15 lines
358 B
Plaintext

```js
// MyComponent.story.js | MyComponent.story.jsx | MyComponent.story.ts | MyComponent.story.tsx
import React from 'react';
import MyComponent from './MyComponent';
export default {
title: 'Path/To/MyComponent',
component: MyComponent,
};
export const Basic = () => <MyComponent />;
export const WithProp = () => <MyComponent prop="value" />;
```