Display notifications to your app
npm install --save msg-notify
First import msg-notify/lib/notify.styl
or msg-notify/dist/notify.css
, then
// import 'msg-notify/dist/notify.css' // import style first
import notify from 'msg-notify'
notify('notification msg', 'success')
notify('error msg', 'error')
config {object}
- the config objectconfig.msg {string}
- notification msg[config.type = 'error'] {stirng}
- notify type: default error, or success, info, warning,[config.timeout = 2] {number}
- timeout to hide (in seconds)[config.position = 'tc'] {string}
- position: default 'tc'(top center), or 'tl'(top left), 'tr'(top right)
MIT