Rename progressFn to api actions, add colors to snackbar
[arvados-workbench2.git] / src / store / snackbar / snackbar-actions.ts
index 55d9f3a8651b86afecc516aa48dc1af0abc412e1..dd34895f77c1d7bfa92ffae94e385329d1c2fbef 100644 (file)
@@ -4,8 +4,15 @@
 
 import { unionize, ofType, UnionOf } from "~/common/unionize";
 
+export enum SnackbarKind {
+    SUCCESS,
+    ERROR,
+    INFO,
+    WARNING
+}
+
 export const snackbarActions = unionize({
-    OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number}>(),
+    OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number, kind?: SnackbarKind}>(),
     CLOSE_SNACKBAR: ofType<{}>()
 });