I am using Sweet Alert for a popup on my product view in an E-commerce Application with two buttons: one for going on cart View and another for reloading the vi
swal(
"Records will be deleted permanently.", //title
"Do you want to delete records?", //text
"warning", //icon
{
closeOnClickOutside: false, // prevent close on click anywhere/outside
buttons: ["No", "Yes"], //with custom label
dangerMode: true,
}
).then(ok => {
if (ok) {
console.log("deleted")
}
else {
console.log("not deleted")
}
})