shoc-frontend-new/src/pages/assets/list/Delete.js
2026-03-30 07:53:42 -05:00

36 lines
933 B
JavaScript

import React from "react";
import {
Dialog,
DialogTitle,
DialogContent,
DialogActions,
Button,
Typography,
} from "@mui/material";
const DeleteDialog = ({ open, onClose, onConfirm, itemName }) => {
return (
<Dialog open={open} onClose={onClose} maxWidth="sm" fullWidth>
<DialogTitle>Confirm Delete</DialogTitle>
<DialogContent>
<Typography>
Are you sure you want to delete the asset <strong>{itemName}</strong>?
</Typography>
<Typography variant="body2" color="text.secondary" sx={{ mt: 1 }}>
This action cannot be undone.
</Typography>
</DialogContent>
<DialogActions>
<Button onClick={onClose} color="inherit">
Cancel
</Button>
<Button onClick={onConfirm} color="error" variant="contained">
Delete
</Button>
</DialogActions>
</Dialog>
);
};
export default DeleteDialog;