diff --git a/src/app/components/UI/MyInput/MyInput.jsx b/src/app/components/UI/MyInput/MyInput.jsx index 6838805..5a4891d 100644 --- a/src/app/components/UI/MyInput/MyInput.jsx +++ b/src/app/components/UI/MyInput/MyInput.jsx @@ -5,7 +5,15 @@ import { classNames } from "../../../utils/classNames"; const MyInput = memo((props) => { const id = nextId(); - const { label, inputData, isValid, noActiveBorder, type, ...otherProps } = props; + const { + label, + inputData, + isValid, + noActiveBorder, + type, + isError, + ...otherProps + } = props; const { value, onChange, onInput, inputValid, onBlur, isDirty, isFilled } = inputData; @@ -37,7 +45,7 @@ const MyInput = memo((props) => { value={value} className={classNames("", { [cls.filled]: isFilled && !noActiveBorder, - [cls.error]: isDirty && !inputValid, + [cls.error]: (isDirty && !inputValid) || isError, [cls.customError]: isDirty && isValid === false && inputValid })} {...otherProps} diff --git a/src/app/components/WalletSend/WalletSend.jsx b/src/app/components/WalletSend/WalletSend.jsx index c72e11a..3ac5da4 100644 --- a/src/app/components/WalletSend/WalletSend.jsx +++ b/src/app/components/WalletSend/WalletSend.jsx @@ -128,6 +128,7 @@ const WalletSend = () => { placeholder="Amount to transfer" label="Amount:" inputData={amount} + isError={amount.value > 1000} />