“sweetalert2 js” Réponses codées

Installer SweetAlert2

npm install --save sweetalert2
Excited Eel

Types de tirs Swal

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");
});
Worrisome Whale

sweetAlert2

$ npm install sweetalert2
Elegant Eel

Documentation SweetAlert 2

Swal.fire({
  title: 'Error!',
  text: 'Do you want to continue',
  icon: 'error',
  confirmButtonText: 'Cool'
})
Disturbed Dogfish

sweetAlert2

Swal.fire(
  'Data Add Successfully!',
  'You clicked the button!',
  'success'
)
Graceful Goose

sweetalert2 js

<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>
Relieved Rattlesnake

Réponses similaires à “sweetalert2 js”

Questions similaires à “sweetalert2 js”

Plus de réponses similaires à “sweetalert2 js” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code