minor: form feedbacks
This commit is contained in:
19
src/scripts/save-feedback.js
Normal file
19
src/scripts/save-feedback.js
Normal file
@ -0,0 +1,19 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: 'top',
|
||||
showConfirmButton: false,
|
||||
timer: 3000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
})
|
||||
document.addEventListener("save", () => {
|
||||
Toast.fire({
|
||||
icon: 'success',
|
||||
title: 'Succès!'
|
||||
})
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user