jnoty-inline
v1.0.1
Published
Snackbar like notification for the web. Build for javascript promises.
Downloads
7
Maintainers
Readme
jnoty-inline
Demo https://visualapps.github.io/jnoty-inline/
Install
npm i jnoty-inline
Demo
📝 https://visualapps.github.io/jnoty-inline/
Usages
Usage is simple:
jnotyInline.pending({
message: 'Updating...'
});
jnotyInline.fulfilled({
message: 'Profile updated successfully.'
});
jnotyInline.rejected({
message: 'Something went wrong!',
sticky: true
});
Hide a notification
jnotyInline.hide();
Options
| ARGUMENT | DESCRIPTION | | ---------------------- | ----------------------------------------------------------------------------------------- | | message | Give a message to notifcation | | timeout | Set a custom delay (in milliseconds) to despair notification | | sticky |Disable timeout and make it sticky| | kind |Set a kind of notification| | position |Set the custom position of the notification |
Kinds : pending, fulfilled, rejected
position : Work in progress. Default: bottom-right
Warning: In future versions some commands may change
Example
<script type="module">
import * as module from './jnoty-inline-min.js';
// open a notification
let notification = module.jnotyInline.pending({message:'Updating...'});
// hide after 10000ms
setTimeout(()=>{
notification.hide();
},10000)
</script>
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
jnoty-inline © rake7h, Released under the MIT License. Authored and maintained by rake7h.
GitHub @visualapps · Twitter @rake7h