Skip to content

Latest commit

 

History

History
102 lines (78 loc) · 3.15 KB

README.md

File metadata and controls

102 lines (78 loc) · 3.15 KB

Welcome to simple-notification 👋

Version Documentation Maintenance License: MIT Twitter: walter19921

Simple Notifications for web aplications

Demo

Install

yarn add simple-notification

Usage

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'.

Dependencies

This library needs the JQuery.

FontAwesome is not required, only if you like using icons.

Development

To compile run:

$ gulp default

To serve local run:

$ npm run dev

Author

👤 Walter Ribeiro

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Walter Ribeiro.
This project is MIT licensed.