Monster.Components.Notify. Notify

This CustomControl creates a notification element with a variety of options.

Dependencies: the system uses functions of the monsterjs library.

You can create this control either by specifying the HTML tag <monster-notify /> directly in the HTML

<monster-notify></monster-notify>

or using Javascript via the document.createElement('monster-notify'); method.

import '@schukai/monster/source/components/notify/notify.js';
document.createElement('monster-notify');

Events

The CustomEvent has the property detail.

node.addEventListener('monster-notify-message',(e)=>console.log(e.detail))

Constructor

new Notify()

A highly configurable select control

Since
  • 1.0.0
Example
import {Notify} from '@schukai/component-notify/source/notify.mjs';

const notify = document.createElement('monster-notify');
document.body.appendChild(notify);

Members

defaults

The defaults can be set either directly in the object or via an attribute in the HTML tag.

The defaults can be set either directly in the object or via an attribute in the HTML tag. The value of the attribute data-monster-options in the HTML tag must be a JSON string.

<monster-notify data-monster-options="{}"></monster-notify>

Since 1.18.0 the JSON can be specified as a DataURI.

new Monster.Types.DataUrl(btoa(JSON.stringify({
       orientation: 'right top'
   })),'application/json',true).toString()
Properties
NameTypeDescription
templatesstring

Template definitions

templatesObject

Template definitions

Properties
NameTypeDescription
mainstring

Main template

Methods

assembleMethodSymbol() → {Notify}

Returns:
Type: 
Notify

push(message) → {Monster.Components.Notify.Notify}

Parameters:
NameTypeDescription
messageMonster.Components.Notify.Massage | String

(static) getCSSStyleSheet() → {Array.<CSSStyleSheet>}

Returns:
Type: 
Array.<CSSStyleSheet>

(static) getTag() → {string}

Returns:
Type: 
string