You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
404 B
14 lines
404 B
import $ from 'jquery';
|
|
import '../../sass/components/notification.scss';
|
|
|
|
export function showNotification(style, text) {
|
|
let htmlNode = document.createElement('div');
|
|
let htmlElement = $(htmlNode).addClass('notification').addClass(`notification--${style}`).text(text).appendTo($('body'));
|
|
|
|
setTimeout(() => {
|
|
htmlElement.fadeOut(400, () => {
|
|
htmlElement.remove();
|
|
})
|
|
}, 3500);
|
|
}
|
|
|
|
|