Referensi API
Dokumentasi / Referensi API untuk module Notify yang telah ditentukan.
Parameter | Tipe | Deskripsi | Argumen | Default |
---|---|---|---|---|
swal | function | Digunakan untuk memanggil notifikasi swal. | params , status | - |
toast | function | Digunakan untuk memanggil notifikasi toast. | params , status | - |
confirm | function | Digunakan untuk memanggil dialog confirm. | params | - |
config | function | Digunakan untuk melakukan global config. | params | {...} |
toast.config | function | Digunakan untuk melakukan spesifik global config toast. | params | {...} |
swal.config | function | Digunakan untuk melakukan spesifik global config swal. | params | {} |
confirm.config | function | Digunakan untuk melakukan spesifik global config confirm. | params | {...} |
warning
Default global config dan spesifik global config bisa dilihat dibawah.
Default Global Config
title: {
error: "",
success: "",
warning: "",
},
message: {
error: "Oops! Something went wrong",
success: "Action performed successfully",
warning: "This action needs attention",
}
Default Spesifik Global Config Toast
toast: true,
timer: 3000,
position: "top-end",
showConfirmButton: false,
timerProgressBar: true,
didOpen: (toast) => {
toast.onmouseenter = Swal.stopTimer;
toast.onmouseleave = Swal.resumeTimer;
}
Default Spesifik Global Config Swal
{}
Default Spesifik Global Config Confirm
title: "Are you sure?",
text: "You won't be able to revert this!",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, delete it!",