1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import type { Meta, StoryObj } from '@storybook/react';
- import { Button } from './Button';
- // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
- const meta: Meta<typeof Button> = {
- title: 'Example/Button',
- component: Button,
- parameters: {
- // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
- layout: 'centered',
- },
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
- tags: ['autodocs'],
- // More on argTypes: https://storybook.js.org/docs/api/argtypes
- argTypes: {
- backgroundColor: { control: 'color' },
- },
- };
- export default meta;
- type Story = StoryObj<typeof Button>;
- // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
- export const Primary: Story = {
- args: {
- primary: true,
- label: 'Button',
- },
- };
- export const Secondary: Story = {
- args: {
- label: 'Button',
- },
- };
- export const Large: Story = {
- args: {
- size: 'large',
- label: 'Button',
- },
- };
- export const Small: Story = {
- args: {
- size: 'small',
- label: 'Button',
- },
- };
|