import Button from "../../app/components/buttons/Button";
export default {
title: "Components/Buttons/Button",
component: Button,
parameters: {
layout: "centered",
docs: {
description: {
component:
"A versatile button component with multiple variants, sizes, and states. Can render as a button or link with full accessibility support. Includes focus states with keyboard navigation - use Tab key to test focus indicators.",
},
},
},
argTypes: {
buttonType: {
control: { type: "select" },
options: ["filled", "outline", "ghost", "danger"],
description: "The button type (Figma prop)",
},
palette: {
control: { type: "select" },
options: ["default", "inverse"],
description: "The button palette (Figma prop)",
},
size: {
control: { type: "select" },
options: ["xsmall", "small", "medium", "large", "xlarge"],
description: "The size of the button",
},
disabled: {
control: { type: "boolean" },
description: "Whether the button is disabled",
},
href: {
control: { type: "text" },
description: "If provided, renders as a link instead of a button",
},
onClick: { action: "clicked" },
},
tags: ["autodocs"],
};
export const Default = {
args: {
children: "Button",
},
};
export const Variants = {
args: {
children: "Button",
size: "large",
},
render: (_args) => (
),
parameters: {
docs: {
description: {
story: "Different visual variants of the button component.",
},
},
},
};
export const Sizes = {
args: {
children: "Button",
buttonType: "filled",
palette: "default",
},
render: (_args) => (
),
parameters: {
docs: {
description: {
story: "Different sizes available for the button component.",
},
},
},
};
export const States = {
args: {
children: "Button",
size: "large",
buttonType: "filled",
palette: "default",
},
render: (_args) => (
),
parameters: {
docs: {
description: {
story: "Different states of the button component.",
},
},
},
};
export const AllVariants = {
args: {},
render: () => (
Filled Variant
Filled Inverse Variant
Outline Variant
Outline Inverse Variant
Ghost Variant
Ghost Inverse Variant
Danger Variant
Danger Inverse Variant
Disabled States
),
parameters: {
docs: {
description: {
story: "Complete overview of all button variants, sizes, and states.",
},
},
},
};