storybook/docs/snippets/common/button-story-primary-long-name.ts-4-9.mdx
2023-05-25 21:04:33 +01:00

30 lines
540 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 = {
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
args: {
primary: true,
label: 'Button',
},
};
export const PrimaryLongName: Story = {
args: {
...Primary.args,
label: 'Primary with a really long name',
},
};
```