From 12803a7b8f91041a5f0fc0c9ec3de367eb67ed68 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Fri, 14 Mar 2025 22:17:54 +0100 Subject: [PATCH] Lib: Add info/warning toast helpers --- src/lib/toast.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/toast.ts b/src/lib/toast.ts index 2f0a325..b10f8c9 100644 --- a/src/lib/toast.ts +++ b/src/lib/toast.ts @@ -1,5 +1,23 @@ import type { ToastSettings } from "@skeletonlabs/skeleton"; +export const get_info_toast = (message: string): ToastSettings => { + return { + message, + hideDismiss: true, + timeout: 2000, + background: "variant-filled-tertiary", + }; +}; + +export const get_warning_toast = (message: string): ToastSettings => { + return { + message, + hideDismiss: true, + timeout: 2000, + background: "variant-filled-secondary", + }; +}; + export const get_error_toast = (message: string): ToastSettings => { return { message,