1.0.1 • Published 5 years ago

jnoty-inline v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

jnoty-inline

Demo https://visualapps.github.io/jnoty-inline/

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

ARGUMENTDESCRIPTION
messageGive a message to notifcation
timeoutSet a custom delay (in milliseconds) to despair notification
stickyDisable timeout and make it sticky
kindSet a kind of notification
positionSet 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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

jnoty-inline © rake7h, Released under the MIT License. Authored and maintained by rake7h.

GitHub @visualapps · Twitter @rake7h