/* eslint-disable @typescript-eslint/no-explicit-any */ "use client"; import { ControllerRenderProps, FieldError } from "react-hook-form"; import { FormControl, FormDescription, FormItem, FormLabel, FormMessage, } from "@/shared/components/ui/form"; import { Input } from "@/shared/components/ui/input"; type InputType = | "text" | "email" | "password" | "number" | "tel" | "date" | "url"; interface FormInputProps { name: string; label: string; type?: InputType; description?: string; placeholder?: string; disabled?: boolean; field: ControllerRenderProps; error?: FieldError; } export const FormInput: React.FC = ({ label, type = "text", description, placeholder = "", disabled = false, field, error, }) => { return ( {label} {description && {description}} {error?.message} ); };