import { forwardRef, type InputHTMLAttributes } from 'react' import { cn } from '@/lib/cn' import { fieldControlClass, useFieldId } from './field' interface TextFieldProps extends InputHTMLAttributes { label: string hint?: string } export const TextField = forwardRef(function TextField( { label, hint, id, name, className, ...props }, ref, ) { const inputId = useFieldId(id, name) const hintId = hint ? `${inputId}-hint` : undefined return (
{hint && (

{hint}

)}
) })