Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Update confirmation dialog text and styling #2907

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,22 @@ function SummaryList(props: SummaryListProps) {
<ConfirmationDialog
open={isDialogOpen}
onClose={handleCloseDialog}
title="Confirm"
title="Do you want to continue?"
confirmText="Yes"
cancelText="No"
>
<Typography>
If you change this answer, you’ll need to confirm all the other
answers after it. This is because a changed answer might mean we have
new or different questions to ask.
<br />
<br />
Are you sure you want to change your answer?
Changing this answer means you will need to confirm any other answers
after it. This is because:
<ul>
<li>
a different answer might mean the service asks new questions
</li>
<li>
your planning officer needs the right information to assess your
application
</li>
</ul>
</Typography>
</ConfirmationDialog>
</>
Expand Down
10 changes: 7 additions & 3 deletions editor.planx.uk/src/components/ConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ export const ConfirmationDialog: React.FC<
maxWidth="xl"
open={open}
>
<DialogTitle>{title}</DialogTitle>
<DialogTitle variant="h4">{title}</DialogTitle>
<DialogContent dividers>{children}</DialogContent>
<DialogActions>
<Button onClick={onCancel}>{cancelText}</Button>
<Button onClick={onConfirm}>{confirmText}</Button>
<Button onClick={onCancel} variant="contained" color="secondary">
{cancelText}
</Button>
<Button onClick={onConfirm} variant="contained" color="prompt">
{confirmText}
</Button>
</DialogActions>
</Dialog>
);
Expand Down
Loading