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

close button added to Confirmation Dialog #1934

Merged
Merged
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
12 changes: 11 additions & 1 deletion src/components/common/ConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import DialogContent from '@mui/material/DialogContent'
import DialogContentText from '@mui/material/DialogContentText'
import DialogTitle from '@mui/material/DialogTitle'

import { Box, IconButton } from '@mui/material'
import CloseIcon from '@mui/icons-material/Close'

import theme from 'common/theme'

export type ConfirmationDialogRef = HTMLDialogElement
export interface ConfirmationDialogProps {
isOpen: boolean
Expand All @@ -31,7 +36,12 @@ const ConfirmationDialog = ({
onClose={handleCancel}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description">
<DialogTitle id="alert-dialog-title">{title}</DialogTitle>
<Box display="flex" justifyContent="space-between" alignItems="center">
<DialogTitle id="alert-dialog-title">{title}</DialogTitle>
<IconButton onClick={handleCancel} sx={{ marginRight: theme.spacing(1) }}>
<CloseIcon />
</IconButton>
</Box>
<DialogContent>
<DialogContentText id="alert-dialog-description">{content}</DialogContentText>
</DialogContent>
Expand Down
Loading