import type { ButtonHTMLAttributes } from "react"; const variants = { primary: "bg-ink text-white hover:bg-ink/90", secondary: "border border-ink/25 bg-white text-ink hover:bg-ink/5", danger: "border border-alert/50 bg-white text-alert hover:bg-alert/10", } as const; const sizes = { // min-h-11 = 44px tap target md: "min-h-11 px-4 text-base", sm: "min-h-11 min-w-11 px-3 text-sm", } as const; export type ButtonVariant = keyof typeof variants; export function buttonClass(variant: ButtonVariant = "primary", size: keyof typeof sizes = "md") { return `inline-flex items-center justify-center gap-2 rounded-md font-bold transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${variants[variant]} ${sizes[size]}`; } type ButtonProps = ButtonHTMLAttributes & { variant?: ButtonVariant; size?: keyof typeof sizes; }; export function Button({ variant, size, className = "", type = "button", ...props }: ButtonProps) { return