@@ -7,8 +7,7 @@ import React, {
77} from "react" ;
88import {
99 CustomButton ,
10- ConfirmModal ,
11- // HistoryPage,
10+ PromptModal ,
1211 // HistoryModal,
1312 //CurlyBracketsIcon,
1413 VariableSelection ,
@@ -344,19 +343,23 @@ const enableWorkflowChange = async () => {
344343 < >
345344 { /* <Card> */ }
346345 < div >
347- < ConfirmModal
346+ < PromptModal
348347 show = { showDiscardModal }
349348 title = { t ( `Discard Flow Changes?` ) }
350349 message = { t (
351350 "Are you sure you want to discard all unsaved changes to the flow of the form?"
352351 ) }
353- messageSecondary = { t ( "This action cannot be undone." ) }
354352 primaryBtnAction = { handleDiscardConfirm }
355353 onClose = { handleDiscardModal }
356354 primaryBtnText = { t ( "Yes, Discard All Unsaved Changes" ) }
357355 secondaryBtnText = { t ( "No, Keep The Changes" ) }
358356 secondaryBtnAction = { handleDiscardModal }
359- size = "sm"
357+ type = "warning"
358+ size = "md"
359+ primaryBtndataTestid = "discard-confirm-button"
360+ secondoryBtndataTestid = "discard-cancel-button"
361+ primaryBtnariaLabel = { t ( "Yes, Discard All Unsaved Changes" ) }
362+ secondoryBtnariaLabel = { t ( "No, Keep The Changes" ) }
360363 />
361364 { /* <div className="head">
362365 {createDesigns && (
@@ -409,9 +412,10 @@ const enableWorkflowChange = async () => {
409412 { /* </Card> */ }
410413 </ div >
411414 { showMigrationModal && (
412- < ConfirmModal
415+ < PromptModal
413416 show = { showMigrationModal }
414417 title = { t ( "***Migration Notice***" ) }
418+ size = "lg"
415419 message = {
416420 < div >
417421 < div className = "message-primary mb-3" >
@@ -458,7 +462,6 @@ const enableWorkflowChange = async () => {
458462 </ div >
459463 }
460464 primaryBtnDisable = { ! isMigrationChecked }
461- messageSecondary = { null } // You can set this to `null` or remove it entirely if unused
462465 primaryBtnAction = { handleMigration }
463466 onClose = { handleCloseMigration }
464467 primaryBtnText = { t (
@@ -467,7 +470,13 @@ const enableWorkflowChange = async () => {
467470 secondaryBtnText = { t ( "Cancel" ) }
468471 secondaryBtnAction = { handleCloseMigration }
469472 buttonLoading = { isMigrationLoading }
470- size = "sm"
473+ type = "info"
474+ primaryBtndataTestid = "migration-confirm-button"
475+ secondoryBtndataTestid = "migration-cancel-button"
476+ primaryBtnariaLabel = { t (
477+ "Link this form that will keep the current flow and its history"
478+ ) }
479+ secondoryBtnariaLabel = { t ( "Cancel" ) }
471480 />
472481 ) }
473482
0 commit comments