Simple Notifications for web aplications
✨ Demo
yarn add simple-notification
Available methods
simpleNotify.basic("message", "title", options)
simpleNotify.info("message", "title", options)
simpleNotify.danger("message", "title", options)
simpleNotify.success("message", "title", options)
simpleNotify.warning("message", "title", options)
Default options
var options = {
type: '',
title: '',
content: '',
lifetime: 5000,
sticky: false,
closeTrigger: true,
iconCls: '',
};
Prop | Description |
---|---|
type |
success, info, warning, danger. |
title |
The title of notification. |
content |
The content of notification. |
lifetime |
The time in milliseconds to destroy the notification. |
sticky |
If true the notification won't be destroyed automatically. |
closeTrigger |
If false the close button won't be displayed. |
iconCls |
Represent the icon class of FontAwesome. For Example 'envelope', it isn't necessary to give the full name like 'fa fa-envelope'. |
This library needs the JQuery.
FontAwesome is not required, only if you like using icons.
To compile run:
$ gulp default
To serve local run:
$ npm run dev
👤 Walter Ribeiro
- Twitter: @walter19921
- Github: @walteribeiro
- LinkedIn: @walterribeiroti
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2020 Walter Ribeiro.
This project is MIT licensed.