mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
18 lines
455 B
TypeScript
18 lines
455 B
TypeScript
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../constants/notifications';
|
|
import type {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
|
|
};
|
|
}
|