41 lines
917 B
TypeScript
41 lines
917 B
TypeScript
// ConfirmationDialog.tsx
|
|
import React from "react";
|
|
|
|
interface ConfirmationPopupProps {
|
|
message: string;
|
|
onConfirm: () => void;
|
|
onCancel: () => void;
|
|
}
|
|
|
|
const ConfirmationPopup: React.FC<ConfirmationPopupProps> = ({
|
|
message,
|
|
onConfirm,
|
|
onCancel,
|
|
}) => {
|
|
return (
|
|
<div className="confirmation-overlay">
|
|
<div className="confirmation-modal">
|
|
<p className="message">{message}</p>
|
|
<div className="buttton-wrapper">
|
|
<button
|
|
className="confirmation-button"
|
|
id="confirmationPopup-confirm-button"
|
|
onClick={onConfirm}
|
|
>
|
|
OK
|
|
</button>
|
|
<button
|
|
className="confirmation-button"
|
|
id="confirmationPopup-cancel-button"
|
|
onClick={onCancel}
|
|
>
|
|
Cancel
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ConfirmationPopup;
|