import { forwardRef, type ButtonHTMLAttributes } from 'react';
import { cn } from '@/lib/cn';
type Variant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'accent';
type Size = 'sm' | 'md' | 'lg' | 'icon';
const variants: Record = {
primary: 'bg-uqo-blue text-white hover:bg-uqo-blue-dark disabled:bg-uqo-blue/50',
secondary: 'bg-uqo-blue-light text-uqo-blue-dark hover:bg-[#d8e5f0]',
ghost: 'bg-transparent text-neutral-text hover:bg-neutral-surface',
danger: 'bg-semantic-error text-white hover:bg-[#a30d26]',
accent: 'bg-uqo-green text-white hover:bg-[#67a51b]',
};
const sizes: Record = {
sm: 'h-9 px-3 text-sm rounded-lg',
md: 'h-11 px-4 text-sm rounded-xl',
lg: 'h-12 px-5 text-base rounded-xl',
icon: 'h-11 w-11 rounded-xl',
};
export interface ButtonProps extends ButtonHTMLAttributes {
variant?: Variant;
size?: Size;
}
export const Button = forwardRef(function Button(
{ className, variant = 'primary', size = 'md', type = 'button', ...props },
ref,
) {
return (
);
});