msg-notify
v1.1.3
Published
Display notifications to your app
Downloads
13
Maintainers
Readme
msg-notify
Display notifications to your app
Installation
npm install --save msg-notify
Usage
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')
API
notify(config)
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)
notify(msg[, type='error'[, timeout=2[, position='tc']]])
License
MIT