Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/confirm.js

Created Dec 16, 2019
Embed
What would you like to do?
Swal
.fire({
title: "Venta #123465",
text: "¿Eliminar?",
icon: 'warning',
showCancelButton: true,
confirmButtonText: "Sí, eliminar",
cancelButtonText: "Cancelar",
})
.then(resultado => {
if (resultado.value) {
// Hicieron click en "Sí"
console.log("*se elimina la venta*");
} else {
// Dijeron que no
console.log("*NO se elimina la venta*");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment