You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use a json to assign styles to html sections. Icons are affected by those, too. As long as I use Nuxt/Icon "the normal way", I can pass down colors. But when I use a component, the Icon is displayed, but I cannot pass down a color nor a size. I have a component like this, with defineProps defined in the script setup:
where service.iconColor comes from a JSON and is a tailwindcss class like text-yellow-300.
It does not work, though.
What do I have to do to get the icon colored the way I want?
BTW: I must use the same syntax, since I do not only use Components for svgs, but also the regular svg.
The text was updated successfully, but these errors were encountered:
I use a json to assign styles to html sections. Icons are affected by those, too. As long as I use Nuxt/Icon "the normal way", I can pass down colors. But when I use a component, the Icon is displayed, but I cannot pass down a color nor a size. I have a component like this, with
defineProps
defined in thescript setup
:And i use it like this:
where
service.iconColor
comes from a JSON and is a tailwindcss class liketext-yellow-300
.It does not work, though.
What do I have to do to get the icon colored the way I want?
BTW: I must use the same syntax, since I do not only use Components for svgs, but also the regular svg.
The text was updated successfully, but these errors were encountered: