import { EyeIcon, EyeOffIcon } from "lucide-react"; import React from "react"; import { useState } from "react"; import { Control, Path } from "react-hook-form"; import { FieldValues } from "react-hook-form"; export interface CommonReactHookFormProps { name: Path; control: Control; } interface PasswordProps extends React.InputHTMLAttributes< HTMLInputElement & CommonReactHookFormProps > {} function Password(props: PasswordProps) { const [show, setShow] = useState(false); return (
{!show && ( setShow(true)} className="text-gray-400 cursor-pointer h-4" /> )} {show && ( setShow(false)} className="text-gray-400 cursor-pointer h-4" /> )}
); } export default Password;