refactor(toast): implemented toast.js refactored 'showToast' and updated pages accordingly

This commit is contained in:
Azmat Ali
2026-03-14 11:06:36 +05:30
parent 1237586411
commit 22a9037b12
4 changed files with 44 additions and 37 deletions
+16
View File
@@ -0,0 +1,16 @@
function showToast(options) {
if (!options) return;
const toast = document.getElementById("toast");
const tMsg = document.getElementById("toast-msg");
const tIcon = document.getElementById("toast-icon");
tMsg.textContent = options.title;
tIcon.textContent = options.icon;
toast.classList.add("show");
setTimeout(() => {
toast.classList.remove("show");
}, 3500);
}