import styles from '../styles/input.module.scss'; import { parseClassName } from '../utils/utils.js'; import {AiFillEye, AiFillEyeInvisible} from 'react-icons/ai' import { useState } from 'react'; export default function Input(props) { const id = Math.random() 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"]} /> ))} ); }