“Pergunta Sweetalert” Respostas de código

Sweet Alert 2 acionará -se ao confirmar

Swal.fire({  
  title: 'Do you want to save the changes?',  
  showDenyButton: true,  showCancelButton: true,  
  confirmButtonText: `Save`,  
  denyButtonText: `Don't save`,
}).then((result) => {  
	/* Read more about isConfirmed, isDenied below */  
    if (result.isConfirmed) {    
    	Swal.fire('Saved!', '', 'success')  
    } else if (result.isDenied) {    
    	Swal.fire('Changes are not saved', '', 'info')  
 	}
});
Orbit Tuner

Sweetalert

<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>swal("My title", "My description", "success");</script>
Code Cat

Bootstrap de alerta doce

Swal.fire(  'Good job!',  'You clicked the button!',  'success')
Brave Baboon

Sweetalert

swal("Good job!", "You clicked the button!", "error");
Uninterested Unicorn

Pergunta Sweetalert

swal({
  title: "Are you sure?",
  text: "Once deleted, you will not be able to recover this imaginary file!",
  icon: "warning",
  buttons: true,
  dangerMode: true,
})
.then((willDelete) => {
  if (willDelete) {
    swal("Poof! Your imaginary file has been deleted!", {
      icon: "success",
    });
  } else {
    swal("Your imaginary file is safe!");
  }
});
Grieving Grasshopper

Respostas semelhantes a “Pergunta Sweetalert”

Perguntas semelhantes a “Pergunta Sweetalert”

Procure respostas de código populares por idioma

Procurar outros idiomas de código