storybook/docs/snippets/react/your-component.ts-4-9.mdx
Kasper Peulen 7452663a26 Prettyyy
2023-01-17 08:10:49 +01:00

28 lines
698 B
Plaintext

```tsx
// YourComponent.stories.ts|tsx
import type { Meta, StoryObj } from '@storybook/react';
import { YourComponent } from './YourComponent';
//👇 This default export determines where your story goes in the story list
const meta = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
} satisfies Meta<typeof YourComponent>;
export default meta;
type Story = StoryObj<typeof meta>;
export const FirstStory: Story = {
args: {
//👇 The args you need here will depend on your component
},
};
```