storybook/docs/snippets/common/button-story-baseline.ts.mdx
2023-05-25 23:11:38 +01:00

23 lines
457 B
Plaintext

```ts
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';
const meta: Meta<typeof Button> = {
component: Button,
};
export default meta;
type Story = StoryObj<typeof Button>;
//👇 Throws a type error it the args don't match the component props
export const Primary: Story = {
args: {
primary: true,
},
};
```