import React, { useRef, FC, useState } from 'react'; import Input, { InputProps } from '../../blocks/Input'; import HidePasswordSVG from '../../assets/icons/icon-hide.svg'; import ShowPasswordSVG from '../../assets/icons/icon-show.svg'; import css from './index.module.css'; export interface InputPasswordProps { InputProps: InputProps; } const InputPassword: FC = ({ InputProps }) => { const inputElement = useRef(null); const [showPassword, setShowPassword] = useState(false); const handlePassword = (): void => { if (inputElement.current.type === 'password') { setShowPassword(true); inputElement.current.type = 'text'; } else { setShowPassword(false); inputElement.current.type = 'password'; } }; return (
); }; export default InputPassword;