import Image from "next/image"; import "./InputWithLabel.scss"; import eye_icon from "./icons/eye-icon.svg"; import eye_off_icon from "./icons/eye-off-icon.svg"; import { useState } from "react"; interface IInputWithLabel { value?: string; label?: string; placeholder?: string; onChange?: (e: React.ChangeEvent) => void; name?: string; secret?: boolean; error: string; } const InputWithLabel: React.FC = ({ placeholder, label, value, onChange, name, secret, error, }: IInputWithLabel) => { const [show, setShow] = useState(false); const handleChange = (e: React.ChangeEvent) => { if (onChange) { onChange(e); } }; return (
{secret && ( )}
{error ?

{error}

: null}
); }; export default InputWithLabel;