hyper/lib/actions/notifications.ts
2020-01-02 21:11:35 +01:00

18 lines
450 B
TypeScript

import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../constants/notifications';
import {HyperActions} from '../hyper';
export function dismissNotification(id: string): HyperActions {
return {
type: NOTIFICATION_DISMISS,
id
};
}
export function addNotificationMessage(text: string, url: string | null = null, dismissable = true): HyperActions {
return {
type: NOTIFICATION_MESSAGE,
text,
url,
dismissable
};
}