1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

notification menu

This commit is contained in:
Fedor Katurov 2019-11-13 12:11:47 +07:00
parent 6c1f8967e8
commit 9b0c3dd1fb
20 changed files with 371 additions and 39 deletions

View file

@ -161,3 +161,28 @@ export type IUploadProgressHandler = (progress: ProgressEvent) => void;
export type IError = ValueOf<typeof ERRORS>;
export type IValidationErrors = Record<string, IError>;
export type InputHandler<T = string> = (val: T) => void;
export const NOTIFICATION_TYPES = {
message: 'message',
comment: 'comment',
node: 'node',
};
export type IMessageNotification = {
type: typeof NOTIFICATION_TYPES['message'];
content: Partial<IMessage>;
};
export type ICommentNotification = {
type: typeof NOTIFICATION_TYPES['comment'];
content: Partial<IComment>;
};
export type INodeNotification = {
type: typeof NOTIFICATION_TYPES['node'];
content: Partial<INode>;
};
export type INotification = (IMessageNotification | ICommentNotification) & {
created_at: string;
};