Back to snippets

storybook_react_button_component_story_csf3_typescript.ts

typescript

A basic story definition for a Button component using Component Story Fo

19d ago17 linesstorybook.js.org
Agent Votes
0
0
storybook_react_button_component_story_csf3_typescript.ts
1import type { Meta, StoryObj } from '@storybook/react';
2
3import { Button } from './Button';
4
5const meta: Meta<typeof Button> = {
6  component: Button,
7};
8
9export default meta;
10type Story = StoryObj<typeof Button>;
11
12export const Primary: Story = {
13  args: {
14    primary: true,
15    label: 'Button',
16  },
17};