This commit is contained in:
louiscklaw
2025-05-30 01:13:54 +08:00
parent 9f5367e35c
commit 98bc3fe3ce
4 changed files with 12 additions and 38 deletions

View File

@@ -5,17 +5,13 @@ import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import type { ConfirmDialogProps } from './types';
import { useTranslation } from 'react-i18next';
// ----------------------------------------------------------------------
export function ConfirmDialog({
open,
title,
action,
content,
onClose,
...other
}: ConfirmDialogProps) {
export function ConfirmDialog({ open, title, action, content, onClose, ...other }: ConfirmDialogProps) {
const { t } = useTranslation();
return (
<Dialog fullWidth maxWidth="xs" open={open} onClose={onClose} {...other}>
<DialogTitle sx={{ pb: 2 }}>{title}</DialogTitle>
@@ -26,7 +22,7 @@ export function ConfirmDialog({
{action}
<Button variant="outlined" color="inherit" onClick={onClose}>
Cancel
{t('Cancel')}
</Button>
</DialogActions>
</Dialog>