import { cva, type VariantProps } from "class-variance-authority"; import { type ComponentProps } from "react"; import { cn } from "../hooks"; const textareaVariants = cva( [ "bg-bg-secondary", "disabled:bg-bg-tertiary", "disabled:text-text-tertiary", "disabled:cursor-not-allowed", "outline-transparent", "placehoder:text-text-secondary/20", "min-h-16", "flex", "w-full", ], { variants: { state: { default: ["hover:bg-bg-tertiary", "focus:bg-bg-quaternary"], error: ["hover:bg-danger-primary/10", "bg-danger-primary/20"], }, size: { sm: ["text-uk-sm", "leading-uk-sm", "rounded-uk-sm", "px-sm", "py-xs"], base: ["text-uk-md", "leading-uk-md", "rounded-uk-md", "px-md", "py-sm"], lg: ["text-uk-lg", "leading-uk-lg", "rounded-uk-md", "px-lg", "py-sm"], }, }, defaultVariants: { state: "default", size: "base", }, }, ); interface TextareaProps extends ComponentProps<"textarea">, VariantProps { state?: "default" | "error"; size?: "sm" | "base" | "lg"; } /** * Multiline text input with size and error variants. */ function Textarea({ className, state, size, ...props }: TextareaProps) { return (