storybook/docs/snippets/react/button-story-with-args.ts-4-9.mdx
2023-05-25 21:04:33 +01:00

22 lines
360 B
Plaintext

```ts
// Button.stories.ts|tsx
import type { Meta, StoryObj } from '@storybook/react';
import { Button, ButtonProps } from './Button';
const meta = {
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
args: {
primary: true,
label: 'Button',
},
};
```