This commit is contained in:
Maulana Sodiqin
2025-03-16 00:33:48 +07:00
parent 3964c22c66
commit 58843041db
13 changed files with 6446 additions and 919 deletions
+104
View File
@@ -0,0 +1,104 @@
import type { Meta, StoryObj } from '@storybook/react';
import { Button } from './button';
const meta: Meta<typeof Button> = {
title: 'Components/Button',
component: Button,
argTypes: {
variant: {
control: 'select',
options: ['primary', 'secondary', 'success', 'danger'],
},
size: {
control: 'select',
options: ['sm', 'md', 'lg'],
},
disabled: {
control: 'boolean',
},
},
};
export default meta;
type Story = StoryObj<typeof Button>;
export const Primary: Story = {
args: {
variant: 'primary',
size: 'md',
children: 'Primary Button',
},
};
export const Secondary: Story = {
args: {
variant: 'secondary',
size: 'md',
children: 'Secondary Button',
},
};
export const Text: Story = {
args: {
variant: 'text',
size: 'md',
children: 'Text Button',
},
};
export const Bordered: Story = {
args: {
variant: 'bordered',
size: 'md',
children: 'Bordered Button',
},
};
export const Success: Story = {
args: {
variant: 'success',
size: 'md',
children: 'Success Button',
},
};
export const Danger: Story = {
args: {
variant: 'danger',
size: 'md',
children: 'Danger Button',
},
};
export const Disabled: Story = {
args: {
variant: 'primary',
size: 'md',
disabled: true,
children: 'Disabled Button',
},
};
export const Large: Story = {
args: {
variant: 'primary',
size: 'lg',
children: 'Large Button',
},
};
export const Medium: Story = {
args: {
variant: 'primary',
size: 'md',
children: 'Medium Button',
},
};
export const Small: Story = {
args: {
variant: 'primary',
size: 'sm',
children: 'Small Button',
},
};