Lib: Add info/warning toast helpers
This commit is contained in:
@ -1,5 +1,23 @@
|
|||||||
import type { ToastSettings } from "@skeletonlabs/skeleton";
|
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 => {
|
export const get_error_toast = (message: string): ToastSettings => {
|
||||||
return {
|
return {
|
||||||
message,
|
message,
|
||||||
|
Reference in New Issue
Block a user