1<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.all.min.js"></script>
1Swal.fire({
2 title: 'Do you want to save the changes?',
3 showDenyButton: true, showCancelButton: true,
4 confirmButtonText: `Save`,
5 denyButtonText: `Don't save`,
6}).then((result) => {
7 /* Read more about isConfirmed, isDenied below */
8 if (result.isConfirmed) {
9 Swal.fire('Saved!', '', 'success')
10 } else if (result.isDenied) {
11 Swal.fire('Changes are not saved', '', 'info')
12 }
13});
1swal({
2 title: "Are you sure?",
3 text: "Your will not be able to recover this imaginary file!",
4 type: "danger",
5 showCancelButton: true,
6 confirmButtonClass: "btn-danger",
7 confirmButtonText: "Yes, delete it!",
8 closeOnConfirm: false
9},
10function(){
11 swal("Deleted!", "Your imaginary file has been deleted.", "success");
12});