This commit is contained in:
Renan LE CARO 2025-05-03 18:29:54 +02:00
parent 94ffb80f49
commit 258d578ad3
22 changed files with 385 additions and 26 deletions

View file

@ -2,8 +2,8 @@ let div = document.createElement("div");
div.classList = "hidden toast";
document.body.appendChild(div);
let timeout: NodeJS.Timeout | undefined;
export function toast(html: string) {
div.classList = "toast visible";
export function toast(html: string, className = "") {
div.classList = "toast visible " + className;
div.innerHTML = html;
if (timeout) {
clearTimeout(timeout);