import type { ComponentProps } from "solid-js"; import { Show, splitProps } from "solid-js"; import { cn } from "@/lib/cn"; export type TextareaProps = ComponentProps<"textarea"> & { /** * Message shown under the field. Marks it invalid and describes it for * assistive tech; needs an `id` so the message can be linked. */ error?: string; }; export function Textarea(props: TextareaProps) { const [local, rest] = splitProps(props, ["class", "error"]); const errorId = () => (props.id ? `${props.id}-error` : undefined); return ( <>