import { FormUi } from "@common/business_components/ui"; import type { ReactNode } from "react"; import type { ControllerRenderProps, FieldError, FieldValues, Path } from "react-hook-form"; interface AccessibleFormFieldProps { field: ControllerRenderProps>; label: string; required?: boolean; error?: FieldError; inputComponent: ReactNode; } export function AccessibleFormField({ label, required = false, error, inputComponent, }: AccessibleFormFieldProps) { const labelText = required ? `${label} *` : label; return (
{inputComponent} {/* {error?.message && Array.from(new Set(error.message.split('\n'))).map((msg, idx) => (

{msg}

))} */}
); }