import { ButtonHTMLAttributes, forwardRef } from "react";
import clsx from "clsx";
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
export type ButtonSize = "sm" | "md" | "lg";
export interface ButtonProps extends ButtonHTMLAttributes {
variant?: ButtonVariant;
size?: ButtonSize;
isLoading?: boolean;
}
const variantClasses: Record = {
primary: "bg-blue-600 text-white hover:bg-blue-700 disabled:bg-blue-300",
secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 disabled:bg-gray-50",
ghost: "bg-transparent text-gray-900 hover:bg-gray-100",
danger: "bg-red-600 text-white hover:bg-red-700 disabled:bg-red-300",
};
const sizeClasses: Record = {
sm: "px-3 py-1.5 text-sm",
md: "px-4 py-2 text-base",
lg: "px-6 py-3 text-lg",
};
const Button = forwardRef(
(
{
variant = "primary",
size = "md",
isLoading,
disabled,
className,
children,
...rest
},
ref,
) => (
),
);
Button.displayName = "Button";
export default Button;