Skip to content

Commit

Permalink
Merge pull request #4 from hamid-deriv/hamid/78467/cancel_wizard_dialog
Browse files Browse the repository at this point in the history
hamid/78467/pa-cancel-wizard-dialog
  • Loading branch information
heorhi-deriv committed Oct 31, 2022
2 parents 732ea26 + 1f3eca4 commit 6c5cb62
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
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;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import CancelWizardDialog from './cancel-wizard-dialog';

export default CancelWizardDialog;
1 change: 0 additions & 1 deletion packages/components/src/components/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
margin-top: 1.4rem;
&--end {
justify-content: flex-end;
}
Expand Down

0 comments on commit 6c5cb62

Please sign in to comment.