import { cn } from "@/lib/utils"; import { forwardRef, type ButtonHTMLAttributes } from "react"; type Variant = "primary" | "secondary" | "ghost" | "outline"; type Size = "sm" | "md" | "lg"; interface ButtonProps extends ButtonHTMLAttributes { variant?: Variant; size?: Size; } const variantClasses: Record = { primary: "bg-ink text-parchment hover:bg-moss-700 disabled:bg-ink/40", secondary: "bg-moss-500 text-parchment hover:bg-moss-600 disabled:bg-moss-500/40", outline: "border border-ink/20 text-ink hover:border-ink/40 hover:bg-ink/5", ghost: "text-ink hover:bg-ink/5", }; const sizeClasses: Record = { sm: "px-3.5 py-2 text-xs", md: "px-5 py-2.5 text-sm", lg: "px-7 py-3.5 text-base", }; export const Button = forwardRef( ({ className, variant = "primary", size = "md", ...props }, ref) => (