codex-marketplace-ui-compon.../stories/ButtonIcon.stories.ts

65 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-08-20 13:57:58 +00:00
import type { Meta, StoryObj } from "@storybook/react";
import { fn } from "@storybook/test";
2024-10-16 08:07:17 +00:00
import { Copy, Download, Plus } from "lucide-react";
import { ButtonIcon } from "../src/components/ButtonIcon/ButtonIcon";
2024-08-20 13:57:58 +00:00
const meta = {
title: "Components/ButtonIcon",
component: ButtonIcon,
parameters: {
layout: "centered",
},
tags: ["autodocs"],
argTypes: {
variant: {
control: { type: "select" },
},
},
args: { onClick: fn(), onMouseEnter: fn(), onMouseLeave: fn() },
2024-08-20 13:57:58 +00:00
} satisfies Meta<typeof ButtonIcon>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Small: Story = {
args: {
Icon: Plus,
variant: "small",
},
};
export const Big: Story = {
args: {
Icon: Plus,
variant: "big",
},
};
export const Disabled: Story = {
args: {
Icon: Plus,
disabled: true,
},
};
2024-10-16 08:07:17 +00:00
export const BuzzAnimation: Story = {
args: {
Icon: Copy,
animation: "buzz"
},
};
export const BounceAnimation: Story = {
args: {
Icon: Download,
animation: "bounce"
},
};
2024-08-20 13:57:58 +00:00
export const CustomStyle: Story = {
args: {
Icon: Plus,
variant: "big",
},
};