import styles from '../styles/input2.module.scss' import { AiFillEye, AiFillEyeInvisible } from "react-icons/ai"; import { useState } from 'react'; export default function Input2(props) { const [type, setType] = useState(props.type||'text') return ( {props.type == "password" && (type != "password" ? ( { setType("password"); }} className={styles["password-toggler"]} /> ) : ( { setType("text"); }} className={styles["password-toggler"]} /> ))} ); }