Comments (4)
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:
src/index.js line 80
$el.close = closeMessage
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 😄
from growl-alert.
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:
var gr = growl()
gr.close()
gr.$element
About the icon option, I'll try to add it this weekend.
from growl-alert.
Wow, so glad this is still active.
Yes, either SVG or font-awesome will do. Better if something like:
Option | Type | Default |
---|---|---|
icon | String/Boolean | false |
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 growl.error()
and the others... add a default icon.
Hmm, I'm not sure tho if it's good to extend DOM element. I'll stick with click
for a while.
from growl-alert.
That's what I actually tried but thought it'll be a breaking change so I stepped back. Thanks!
from growl-alert.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from growl-alert.