import React from "react"; type ButtonProps = React.ButtonHTMLAttributes & { variant?: "primary" | "secondary" | "outline" | "danger"; loading?: boolean; }; export function Button({ variant = "primary", loading = false, className = "", children, disabled, ...rest }: ButtonProps) { const base = "inline-flex items-center justify-center rounded px-4 py-2 text-sm transition-colors"; const variants: Record = { primary: "bg-blue-600 text-white hover:bg-blue-700", secondary: "bg-gray-800 text-white hover:bg-black/90", outline: "border border-gray-300 text-gray-800 hover:bg-gray-50", danger: "bg-red-600 text-white hover:bg-red-700", }; const cls = [base, variants[variant], disabled || loading ? "opacity-60 cursor-not-allowed" : "", className] .filter(Boolean) .join(" "); return ( ); }