storybook/docs/snippets/common/csf-3-example-title.ts.mdx
2023-02-03 14:28:45 -05:00

21 lines
453 B
Plaintext

```ts
// src/components/Button/Button.stories.tsx
const meta: Meta<Button> = {
// Sets the name for the stories container
title: 'components/Button',
// The component name will be used if `title` is not set
component: Button,
};
export default meta;
// The story variable name will be used if `name` is not set
const Primary: Story = {
// Sets the name for that particular story
name: 'Primary',
args: {
label: 'Button',
},
};
```