Closed gerbenqikker closed 6 years ago
up, I also need this option.
Implemented, could you test? @tronjs @gerbenqikker https://github.com/dolce/iziToast/releases/tag/v1.4.0
Hi @dolce - I'm currently not working on the project where we ran into this and due to time we chose to just run with the icons that are included with iziToast instead. For the foreseeable future I won't be able to help you to test this; I'll see if I can squeeze it in between projects somewhere :)
Thanks for picking it up though - this will definately make me use it again on future projects!
Ok @qikkeronline , but it's simple, just use the iconUrl option, example:
iconUrl: 'assets/star.svg'
v1.4.0 released. https://www.npmjs.com/package/izitoast
Just tried this @dolce, and even though it works good with images; it does not work with any HTML element but just populates the src attribute of an image node in stead. The reason I would like this is so I could just inject the SVG node here and hence can manipulate the SVG color etc with CSS. Right now I could make this work but it was only because I exported the SVG files with set fill attributes. But this prevents me from being able to style the SVG with CSS.
For now good enough for my use but I think it would be nice if we could append any HTML there.
Thanks!
Hi there,
First of all, loving the library; so far the only thing that I've not been able to get working is to use my own SVG icons instead of an icon font with this library.
I got to the point where I am passing these parameters:
Sadly this does not work since the iconText login in Izitoast injects a text node rather then just appending the HTML.
I think it would be a relatively small change, and would make the entire thing a lot more customisable.