import { forwardRef, type ButtonHTMLAttributes } from 'react';
import { cn } from '@/lib/cn';
type Variant = 'primary' | 'secondary' | 'ghost' | 'danger';
type Size = 'sm' | 'md' | 'lg';
interface Props extends ButtonHTMLAttributes {
variant?: Variant;
size?: Size;
}
const VARIANT: Record = {
primary: 'bg-brand-500 text-white hover:bg-brand-600 shadow-sm shadow-brand-500/25',
secondary: 'bg-white text-ink-900 border border-ink-200 hover:border-ink-300',
ghost: 'text-ink-700 hover:text-ink-900 hover:bg-ink-100',
danger: 'bg-rose-500 text-white hover:bg-rose-600 shadow-sm shadow-rose-500/25',
};
const SIZE: Record = {
sm: 'px-3 py-1.5 text-sm rounded-lg gap-1.5',
md: 'px-4 py-2 text-sm rounded-xl gap-2',
lg: 'px-5 py-2.5 text-sm rounded-xl gap-2',
};
export const Button = forwardRef(function Button(
{ variant = 'primary', size = 'md', className, ...rest },
ref,
) {
return (
);
});