import React, { useState, InputHTMLAttributes } from "react"; interface FormFieldProps extends InputHTMLAttributes { title: string; placeholder?: string; value: string; handleChangeText: (value: string) => void; } const FormField = ({ title, placeholder, value, handleChangeText, ...props }: FormFieldProps) => { const [showPassword, setShowPassword] = useState(false); const isPasswordField = title.toLowerCase().includes("password"); const inputId = `input-${title.replace(/\s+/g, "-").toLowerCase()}`; return (
handleChangeText(e.target.value)} className="flex-1 bg-transparent outline-none border-none text-blue-950 text-[16px] font-inherit" {...props} /> {isPasswordField && ( )}
); }; export default FormField;