A notification message component.
A fork with API rework from yuehu/notice.
Showcase at http://chemzqm.github.io/notice/.
Install with component(1):
$ component install chemzqm/notice
var Notice = require('notice');
var notice = new Notice('show a notice', {
type: 'success',
duration: 4000
})Show notice with msg (String or HTML) and optional option.
option.typecould besuccess(implies duration to be 2000)warningerror.option.durationcould be the millisecond to auto hide, no close button when set.option.closablewhether the notice should be closable.option.parentparent node of the notice
Hide the message in ms millisecond, success notice implies auto hide.
Remove the message without animation.
MIT