import React, { useState } from 'react'; // import './password.css' import IMAGE from '../../../assets/images/icons/index' type Props = { label?: string, id:string, name: string, value:string; placeholder?: string, disable?: boolean, readonly?: boolean, helperText?: string, error?: boolean, errorMessage?: string, icon?:boolean, size?: 'default' | 'small' | 'medium' | 'large', borderRadious?: 'small' | 'medium' | 'large', handleChange: (event: React.ChangeEvent) => void; } const InputField = (props: Props) => { const [passwordShown, setPasswordShown] = useState(false); const {label, id, name,value, placeholder, disable, readonly,helperText,error,errorMessage,borderRadious, size,icon=true, handleChange} = props; const SVG= IMAGE.EyeviewSolid const SVG1= IMAGE.EyeslashSolid const style = { paddingRight: icon ? '40px' : '10px' } const togglePassword = () => { setPasswordShown(!passwordShown); }; return (
{icon ? {passwordShown ? : } : '' }
{(error && errorMessage) &&

{errorMessage}

} {(!error && helperText) &&

{helperText}

}
) }; export default InputField;