diff --git a/assets/js/toast.js b/assets/js/toast.js new file mode 100644 index 0000000..bd0bcda --- /dev/null +++ b/assets/js/toast.js @@ -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); +} diff --git a/checkout.html b/checkout.html index 31f05f9..490b01b 100644 --- a/checkout.html +++ b/checkout.html @@ -85,6 +85,7 @@