1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-13 01:56:24 +02:00

get preact files into root

This commit is contained in:
Kushagra Gour
2018-06-16 14:56:14 +05:30
parent f5d2b5d1a7
commit dfcd5bc505
57 changed files with 18452 additions and 40 deletions

20
src/notifications.js Normal file
View File

@ -0,0 +1,20 @@
var hideTimeout;
function addNotification(msg) {
const noticationContainerEL = $('#js-alerts-container');
// var n = document.createElement('div');
// div.textContent = msg;
// noticationContainerEL.appendChild(n);
noticationContainerEL.textContent = msg;
noticationContainerEL.classList.add('is-active');
clearTimeout(hideTimeout);
hideTimeout = setTimeout(function () {
noticationContainerEL.classList.remove('is-active');
}, 2000);
}
export const alertsService = {
add: addNotification
};