iziToast
iziToast copied to clipboard
Icon Fontawesome (svg with js) not showing in iziToast.
Helo you can fix then? Icon in iziToast not load with fontawesome.js (svg with js).
@dolce Hello guys, I need an answer.
I don't know if you can use fontawesome at all. I found the same problem as you so I had a look into the src.
Just got that you can use only 5 icons (which should be just enough in typical project)
'ico-info','ico-success','ico-warning','ico-error' and 'ico-question'
Have it a try
Hello. Now you can also include an alternate icon being SVG or Image.
iconUrl: 'assets/star.svg'
The icon is loaded but set with opacity:0.
.
If you add a class with opacity:1 !important; then you can override the opacity and boom your icon is visible.
My icon code.
Thanks @bryansamuel1 for the solution. I actually added the custom class as well as an override of the iziToast-icon class to reduce the top margin. If you use the standard 50%, it will push it all the way to the bottom of the element. 30% seems to keep it in the right position regardless of which layout used. So I went with that - for now.
.fontAwesomeOpacity {
opacity: 1 !important;
}
.iziToast>.iziToast-body .iziToast-icon {
top: 30%;
}
Does this still occur? how can i reproduce here?
Same here. Fresh installation. Opacity 0 for icons.
Caused by
.iziToast.iziToast-animateInside .iziToast-icon
Fixed with the help of suggestions above.