diff --git a/src/lib/toast.ts b/src/lib/toast.ts index b10f8c9..ae8ee67 100644 --- a/src/lib/toast.ts +++ b/src/lib/toast.ts @@ -1,28 +1,28 @@ import type { ToastSettings } from "@skeletonlabs/skeleton"; -export const get_info_toast = (message: string): ToastSettings => { +export const get_info_toast = (message: string, timeout: number = 2000): ToastSettings => { return { message, hideDismiss: true, - timeout: 2000, + timeout, background: "variant-filled-tertiary", }; }; -export const get_warning_toast = (message: string): ToastSettings => { +export const get_warning_toast = (message: string, timeout: number = 2000): ToastSettings => { return { message, hideDismiss: true, - timeout: 2000, + timeout, background: "variant-filled-secondary", }; }; -export const get_error_toast = (message: string): ToastSettings => { +export const get_error_toast = (message: string, timeout: number = 2000): ToastSettings => { return { message, hideDismiss: true, - timeout: 2000, + timeout, background: "variant-filled-primary", }; };