“Documentation SweetAlert 2” Réponses codées

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(
  'Good job!',
  'You clicked the button!',
  'failed'
)
Wrong Worm

sweetAlert2

const Toast = Swal.mixin({
  toast: true,
  position: 'top-end',
  showConfirmButton: false,
  timer: 3000,
  timerProgressBar: true,
  didOpen: (toast) => {
    toast.addEventListener('mouseenter', Swal.stopTimer)
    toast.addEventListener('mouseleave', Swal.resumeTimer)
  }
})

Toast.fire({
  icon: 'success',
  title: 'Signed in successfully'
})
Samir Amegroud

sweetAlert2

const { value: email } = await Swal.fire({  title: 'Input email address',  input: 'email',  inputLabel: 'Your email address',  inputPlaceholder: 'Enter your email address'})if (email) {  Swal.fire(`Entered email: ${email}`)}
Thoughtless Tarantula

Réponses similaires à “Documentation SweetAlert 2”

Questions similaires à “Documentation SweetAlert 2”

Plus de réponses similaires à “Documentation SweetAlert 2” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code