This commit is contained in:
Kenneth Jannette
2024-03-23 03:24:07 -05:00
parent f8e2f5cea6
commit d130cb590a
2 changed files with 17 additions and 1 deletions

View File

@@ -23,9 +23,11 @@ const ConfirmModal = ({
cancelButtonText, cancelButtonText,
}) => { }) => {
const [inputValue, setInputValue] = useState(""); const [inputValue, setInputValue] = useState("");
const [codeError, setCodeError] = useState("");
const title = titleText ? titleText : "Confirmation"; const title = titleText ? titleText : "Confirmation";
const handleConfirm = (code) => { const handleConfirm = (code) => {
if (!code) { if (!code) {
setCodeError("Please enter a code");
return; return;
} }
onConfirm(code); onConfirm(code);
@@ -70,6 +72,13 @@ const ConfirmModal = ({
: "Description of issue" : "Description of issue"
} }
/> />
<div className="confirm-error-box">
{codeError ? (
<p className="confirm-error-text">{codeError}</p>
) : (
<></>
)}
</div>
</div> </div>
) : ( ) : (
<></> <></>

View File

@@ -34,7 +34,14 @@
color: red; color: red;
} }
} }
.confirm-error-box {
margin-top: -6px;
}
.confirm-error-text {
font-size: 14px;
color: red;
margin-left: 12px;
}
.upload-header-bold { .upload-header-bold {
font-weight: 500; font-weight: 500;
} }