Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 661 Bytes

File metadata and controls

35 lines (26 loc) · 661 Bytes

notification-manager

A notification manager used to create notifications to be shown to the user.

How it works

Append the notification-manager element anywhere in the dom. By default it will listen to all notify events up to the document.

<notification-manager></notification-manager>

Then use javascript to dispatch notify events.

const notifyEvent = new CustomEvent('notify-error', {
  bubbles: true,
  detail: {
    text: 'Error message',
    duration: Infinity
  },
  bubbles: true,
  composed: true  
});

this.dispatchEvent(notifyEvent);

Event listen

notify-error notify-warning notify-info notify-success