import React, { RefObject } from "react"; import classes from "./classes.module.scss"; import classNames from "classnames"; import Image from "next/image"; import ErrorIcon from "@Assets/Icons/input-error.svg"; import SuccessIcon from "@Assets/Icons/input-success.svg"; type IProps = { inputRef?: RefObject; icon?: string; placeholder?: string; name?: string; value?: string; onChange: any; onBlur?: any; inputStatus: "success" | "error" | "neutral"; errorMsg?: string; type: string; }; export default class InputField extends React.Component { public constructor(props: IProps) { super(props); } public override render(): JSX.Element { return ( <>
{this.props.icon && {this.props.icon}}
{this.props.inputStatus === "success" && success icon} {this.props.inputStatus === "error" && error icon}
{this.props.errorMsg &&
{this.props.errorMsg}
} ); } }