import { Confirm } from "../link-to-file";
/* Confirmation Delete */
const handleDelete = () => {
Confirm({
title: "Confirmation delete",
message: "Are you sure to delete?",
okText: 'Confirm',
confirmColor: 'primary',
onOk() {
console.log('confirmed');
},
onCancel() {
console.log('closed');
},
});
};
**
**
<Button onClick={handleDelete}>Delete</Button>
Hi, thanks for your demo, it works fine but I dont understand why do you need to return a promise and also keep its resolve value saved in a variable. Do you have other examples with a scenario that it would be used?
Cheers