add notifications

This commit is contained in:
kandrusyak
2022-11-27 18:25:23 +03:00
parent 8b583843ba
commit 4068bb7a33
4 changed files with 177 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
import { reactive } from "vue";
export const notifications = reactive({});
export const addNotification = (id, title, message, type, lifeTime = 0) => {
notifications[id] = {
title,
message,
type,
lifeTime,
};
};
export const deleteNotification = (id) => {
delete notifications[id];
};