f3oall / awesome-notifications

Lightweight JavaScript Notifications Library
https://f3oall.github.io/awesome-notifications/
MIT License
292 stars 40 forks source link

Add a close/dismiss button when duration: 0 #44

Open TDola opened 4 years ago

TDola commented 4 years ago

When duration is set to 0, The notification correctly stays. However, there is no visual cue for the user to know to click the notification to remove it.

I would like an option to add a close button at the top right of the notification similar to jquery toasts https://kamranahmed.info/toast and bootstrap toasts https://bootstrap-vue.org/docs/components/toast

xor83 commented 2 years ago

let spinner = new AWN().tip('Please wait...', {durations: {tip: 0}, icons : {tip: 'cog fa-spin'}, labels : {tip: 'Some message'} })

And when you want to remove the spinner spinner.remove()