From b30a00a9713fd52865129132317beb6fa875017c Mon Sep 17 00:00:00 2001 From: "bozo.kopic" Date: Sun, 13 Nov 2022 03:39:02 +0100 Subject: type script --- src_js/notification.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src_js/notification.ts (limited to 'src_js/notification.ts') diff --git a/src_js/notification.ts b/src_js/notification.ts new file mode 100644 index 0000000..29a2d63 --- /dev/null +++ b/src_js/notification.ts @@ -0,0 +1,7 @@ +import iziToast from 'izitoast'; + + +export function show(type: string, message: string) { + const fn = (type == 'success' ? iziToast.success : iziToast.error); + fn.apply(iziToast, [{message: message}]); +} -- cgit v1.2.3-70-g09d2