"use client"; import type { ComponentPropsWithoutRef, ReactNode } from "react"; import { cn } from "@/lib/utils"; export function Label({ className, ...props }: ComponentPropsWithoutRef<"label">) { return ( ); } type FieldProps = ComponentPropsWithoutRef<"div"> & { label?: ReactNode; description?: ReactNode; error?: ReactNode; htmlFor?: string; }; export function Field({ label, description, error, htmlFor, children, className, ...props }: FieldProps) { const descriptionId = htmlFor && description ? `${htmlFor}-description` : undefined; const errorId = htmlFor && error ? `${htmlFor}-error` : undefined; return (
{description}
) : null} {error ? ({error}
) : null}