Blazored / Toast

A JavaScript free toast library for Blazor and Razor Component applications
https://blazored.github.io/Toast/
MIT License
654 stars 90 forks source link

[Feature] Additional or custom icons #212

Open TheAnachronism opened 1 year ago

TheAnachronism commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, icons from font-awesome, material design and the internal ones are available, but it would be quite nice to also be able to use other icon libraries like bootstrap icons.

Describe the solution you'd like I noticed that there's an IconType.Custom option, but that seems to just get ignored when using it. I haven't been able to have a look at the source code, but maybe when using the custom or a bootstrap option, one can specify which classes should be applied on an <i> element to build the requested icon.

Describe alternatives you've considered I'm currently fine with using the ones available, but having more options is always good.

Cvijo commented 1 year ago

it seems there is no implementation for the Custom type .. I suggest passing HTML string to the Icon property it gives you more options than just passing a class to tag. Some libraries need to be wrapped in tag or you might have icons as SVG images.

for example options.Icon = <img src="myIcon.svg"/>

I will make PR for this and @chrissainty can check it later

TheAnachronism commented 1 year ago

Yeah, that makes sense. Thanks for the quick answer and I hope this gets merged ^^