This commit is contained in:
Kenneth Jannette
2024-03-22 21:43:19 -05:00
parent 36be048407
commit 73026972f8
4 changed files with 185 additions and 24 deletions

View File

@@ -22,6 +22,7 @@ const ConfirmModal = ({
isPromoModal,
cancelButtonText,
}) => {
const [inputValue, setInputValue] = useState("");
const title = titleText ? titleText : "Confirmation";
return (
@@ -53,11 +54,11 @@ const ConfirmModal = ({
<TextInput
key={"captionTwo"}
name={"captionTwo"}
value={issueText}
value={inputValue}
message={"data.captionTwo.message"}
onChange={(e) => setIssueText(e.target.value)}
onChange={(e) => setInputValue(e.target.value)}
label={
issueText
inputValue
? ""
: isPromoModal
? "Enter your promotional code"
@@ -79,7 +80,7 @@ const ConfirmModal = ({
<Button
disabled={isBusy}
className="primary-button"
onClick={onConfirm}
onClick={() => onConfirm(inputValue)}
labelText={buttonLabelText}
/>
</Modal.Footer>