X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/cdc8a73914399a401642ca553e9d3d8b2d42db5c..f22d9424ca3321c01e3a9b27ed5905b80eee35f5:/src/store/snackbar/snackbar-actions.ts diff --git a/src/store/snackbar/snackbar-actions.ts b/src/store/snackbar/snackbar-actions.ts index 55d9f3a8..d6d7128e 100644 --- a/src/store/snackbar/snackbar-actions.ts +++ b/src/store/snackbar/snackbar-actions.ts @@ -4,9 +4,23 @@ import { unionize, ofType, UnionOf } from "~/common/unionize"; +export interface SnackbarMessage { + message: string; + hideDuration: number; + kind: SnackbarKind; +} + +export enum SnackbarKind { + SUCCESS = 1, + ERROR = 2, + INFO = 3, + WARNING = 4 +} + export const snackbarActions = unionize({ - OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number}>(), - CLOSE_SNACKBAR: ofType<{}>() + OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number, kind?: SnackbarKind}>(), + CLOSE_SNACKBAR: ofType<{}>(), + SHIFT_MESSAGES: ofType<{}>() }); export type SnackbarAction = UnionOf;