import { Field, Label, Description, Input as HeadlessUiInput, type InputProps, } from "@headlessui/react"; import clsx from "clsx"; import { type Ref, type ReactNode, forwardRef } from "react"; import { ErrorTooltip } from "../ErrorTooltip"; type Props = InputProps & { label: ReactNode; description: ReactNode; required?: boolean | undefined; validationError?: string | undefined; }; const InputImpl = ( { label, description, className, required, invalid, validationError, ...props }: Props, ref: Ref, ) => (
{validationError && ( {validationError} )}
{description}
); export const Input = forwardRef(InputImpl);