Notify plugin: add onClick event to configuration options #16807
Unanswered
elste
asked this question in
Ideas / Proposals
Replies: 2 comments 2 replies
-
|
Wow 🎉 this should be useful for my project 🤩 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
this can be done like this: Notify.create({
position: 'top',
color: 'green',
message,
icon,
timeout: 1500,
actions:[
onclick=()=>console.log('clicked'), //there you go
]
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I would like to work on the Notify plugin.
My goal is to close notifications by clicking on them, without using actions.
I couldn't find anything about it in the documentation.
So I want to add an onClick event to configuration options.
I initially considered using a boolean property (e.g. closeOnClick), but I think onClick event can provide a higher level of abstraction and more ways of using it.
Before I start working on it, I would like to know your opinions and any advice.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions