forked from binary-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from hamid-deriv/hamid/78467/cancel_wizard_dialog
hamid/78467/pa-cancel-wizard-dialog
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...rc/pages/payment-agent/payment-agent-signup/cancel-wizard-dialog/cancel-wizard-dialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import { Dialog } from '@deriv/components'; | ||
import { localize } from '@deriv/translations'; | ||
|
||
type TCancelWizardDialogProps = { | ||
onConfirm: VoidFunction; | ||
onCancel: VoidFunction; | ||
is_visible: boolean; | ||
}; | ||
|
||
const CancelWizardDialog = ({ onConfirm, onCancel, is_visible }: TCancelWizardDialogProps) => { | ||
return ( | ||
<Dialog | ||
title={localize('Are you sure you want to cancel?')} | ||
confirm_button_text={localize('Yes, cancel')} | ||
cancel_button_text={localize('No, take me back')} | ||
onConfirm={onConfirm} | ||
onCancel={onCancel} | ||
is_visible={is_visible} | ||
has_close_icon | ||
> | ||
{localize('If you click Cancel, you’ll lose the inputs you’ve made so far.')} | ||
</Dialog> | ||
); | ||
}; | ||
|
||
export default CancelWizardDialog; |
3 changes: 3 additions & 0 deletions
3
packages/cashier/src/pages/payment-agent/payment-agent-signup/cancel-wizard-dialog/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import CancelWizardDialog from './cancel-wizard-dialog'; | ||
|
||
export default CancelWizardDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters