iziToast icon indicating copy to clipboard operation
iziToast copied to clipboard

Icon Fontawesome (svg with js) not showing in iziToast.

Open mickorj opened this issue 6 years ago • 7 comments

Helo you can fix then? Icon in iziToast not load with fontawesome.js (svg with js).

mickorj avatar May 15 '18 05:05 mickorj

@dolce Hello guys, I need an answer.

mickorj avatar May 17 '18 12:05 mickorj

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

realvee avatar Jul 15 '18 07:07 realvee

Hello. Now you can also include an alternate icon being SVG or Image.

iconUrl: 'assets/star.svg'

marcelodolza avatar Aug 13 '18 08:08 marcelodolza

The icon is loaded but set with opacity:0. image. If you add a class with opacity:1 !important; then you can override the opacity and boom your icon is visible. image My icon code. image

bryansamuel1 avatar Nov 28 '18 11:11 bryansamuel1

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%;
}

gtmadev avatar Mar 02 '20 04:03 gtmadev

Does this still occur? how can i reproduce here? Screen Shot 2020-04-06 at 08 23 36

marcelodolza avatar Apr 06 '20 07:04 marcelodolza

Same here. Fresh installation. Opacity 0 for icons. Caused by .iziToast.iziToast-animateInside .iziToast-icon Fixed with the help of suggestions above.

vieditcom avatar Jul 29 '20 10:07 vieditcom