import * as React from 'react'; import { cn } from '@/lib/utils'; type Variant = 'default' | 'destructive' | 'outline' | 'ghost'; type Size = 'sm' | 'md' | 'lg'; interface ButtonProps extends React.ButtonHTMLAttributes { variant?: Variant; size?: Size; loading?: boolean; } const variantClasses: Record = { default: 'bg-brand-600 text-white hover:bg-brand-700 focus:ring-brand-500', destructive: 'bg-red-600 text-white hover:bg-red-700 focus:ring-red-500', outline: 'border border-slate-300 bg-white text-slate-700 hover:bg-slate-50 focus:ring-brand-500', ghost: 'text-slate-600 hover:bg-slate-100 hover:text-slate-900 focus:ring-brand-500', }; const sizeClasses: Record = { sm: 'px-3 py-1.5 text-sm', md: 'px-4 py-2 text-sm', lg: 'px-6 py-3 text-base', }; /** * Reusable button component with variant and size support. * * @param variant - Visual style: default | destructive | outline | ghost * @param size - Size: sm | md | lg * @param loading - When true, shows a spinner and disables the button */ export function Button({ variant = 'default', size = 'md', loading = false, className, children, disabled, ...props }: ButtonProps): React.JSX.Element { return ( ); }