tv-toast
tv-toast copied to clipboard
Custom icon
It would be great to be able to customize the notification icon.
The difficult thing here is that it's programmatic, so slots and ways to pass this in is not really possible since there's no template to add to.
Suggestions?
I'm not completely sure I understand the issue. Could we replace the "IconCheck" tag with a custom html element if defined?
If I could change the icon colors, that would be great. I'm making a dark themed website, and the white icons on a dark background don't look great. Is there a built in dark theme? If not, it would be great to be able to customize the color a bit.
Why can't you just provide a component with a slot just like https://github.com/sansil/vt-notifications ?
@appinteractive hmm, how would that work w/ the programmatic initiation? i'm not sure how we could look for that slot definition
@tandpfun I could potentially add classIconPrimary
and classIconSecondary
to the overrides, can you open a separate issue for this?
#20
I find the approach with only passing of classes okay for non tailwind projects. But for tailwind it's a must have in my opinion.
I did wrote it myself now in 1h using a store and a renderless component that uses the scoped slots (like the other repo) and a transition group. There way I do not need dozens of props but just provide my notification component with its logic and icons so I'm totally flexible and have a very simple solution.
Take a look at the me mentioned repo as that approach is solved there very elegantly. You just need a renderless component in your Layout which exposes the current array of notifications over which you can iterate. That component could set a flag to to not render it elsewhere like currently when you are using it.
Hope that helps a bit.