import * as React from "react"; import { Slot } from "@radix-ui/react-slot"; import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "../../lib/utils"; const buttonVariants = cva( "inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-300 disabled:pointer-events-none disabled:opacity-50", { variants: { variant: { default: "bg-primary text-white hover:bg-primary-light", secondary: "border border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50", outline: "border border-zinc-200 bg-transparent text-zinc-900 hover:bg-zinc-50", destructive: "bg-red-600 text-white hover:bg-red-700", ghost: "bg-transparent text-zinc-700 hover:bg-zinc-100", link: "bg-transparent text-primary underline-offset-4 hover:underline", }, size: { default: "h-11 px-4", sm: "h-10 rounded-md px-3 text-xs", lg: "h-12 rounded-xl px-6 text-base", icon: "h-11 w-11 p-0", }, }, defaultVariants: { variant: "default", size: "default", }, }, ); export type ButtonProps = React.ButtonHTMLAttributes & VariantProps & { asChild?: boolean; }; export const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { const Comp = asChild ? Slot : "button"; return ( ); }, ); Button.displayName = "Button";