-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Close method and Icon option #1
Comments
How would this icon option work? Allow you to define a class or html for the icon? e.g a font-awesome class or even a SVG ? About the close method, for a simple solution I can think about something like this: Works just fine http://codepen.io/vfreitas-/pen/zZXewx What do you think? Feel free to make a PR if you want, contributions are welcome 😄 |
Wow, so glad this is still active. Yes, either SVG or font-awesome will do. Better if something like:
Now if it's a string, it'll be a class containing the icon you want OR the SVG. That's for the default growl. If it's Hmm, I'm not sure tho if it's good to extend DOM element. I'll stick with |
I've released the version 1.0.0, and now it returns an object containing the element and the close method. So you can just do:
About the icon option, I'll try to add it this weekend. |
That's what I actually tried but thought it'll be a breaking change so I stepped back. Thanks! |
Would like to have both of those :)
Great work for being minimal!
I'll try to make a minimal change and make a PR for the
close
methodI think I'll be making a breaking changes. Thought I could just make the closeMessage public and make a growl by doing
new growl({ ...opts })
. Works for me that way, but the tests failed and hence introduces breaking changes.I'll just trigger a
click
to close it.The text was updated successfully, but these errors were encountered: