instalar Sweetalert2
npm install --save sweetalert2
Excited Eel
npm install --save sweetalert2
swal({
title: "Are you sure?",
text: "Your will not be able to recover this imaginary file!",
type: "danger",
showCancelButton: true,
confirmButtonClass: "btn-danger",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: false
},
function(){
swal("Deleted!", "Your imaginary file has been deleted.", "success");
});
$ npm install sweetalert2
Swal.fire({
title: 'Error!',
text: 'Do you want to continue',
icon: 'error',
confirmButtonText: 'Cool'
})
Swal.fire(
'Data Add Successfully!',
'You clicked the button!',
'success'
)
<link href="//cdn.jsdelivr.net/npm/@sweetalert2/theme-dark@4/dark.css" rel="stylesheet">
<script src="//cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.js"></script>