import type { ButtonHTMLAttributes, ReactNode } from "react"; import { cn } from "@/lib/cn"; type ButtonVariant = "primary" | "secondary" | "ghost" | "danger"; const buttonVariants: Record = { primary: "bg-ctp-mauve text-ctp-crust hover:brightness-110", secondary: "border border-ctp-surface1 bg-ctp-surface0 text-ctp-text hover:bg-ctp-surface1", ghost: "text-ctp-subtext0 hover:bg-ctp-surface0 hover:text-ctp-text", danger: "border border-ctp-red/40 text-ctp-red hover:bg-ctp-red/15", }; interface ButtonProps extends ButtonHTMLAttributes { variant?: ButtonVariant; } export function Button({ variant = "primary", className, ...props }: ButtonProps) { return (