Correct. The oh-icon does not have any accessible slots. Most of the oh- type widgets have reduced functionality with regards to the f7- counterparts for ease of configuration.
Putting additional elements inside the slots of an icon seems a little unusual though (one reason why that functionality was probably not included in the oh-icon to begin with). If you explain a little more what you are trying to achieve, someone here might be able to suggest a more robust solution.
Currently using core 3.1M2 but I built the openhab-webui about a week ago because I need the grid layout and the oh-clock (as opposed to oh-clock-card) component that was recently merged. Haven’t yet updated to 3.1M3.
OK, a trick - just add the f7-badge component on the same level as the oh-icon and use style left: -somethingpx. Not ideal, because the badge doesn’t respond to action, but I can move on.
What isn’t possible with this right now is the use of oh-icons as it only supports the f7- & material iconset. You could open an issue for that on github. The forum isn’t the ideal place to submit feature requests or report bugs.
The problem with this, basically, is that f7/material icons and OH icons are quite different i.e. to render them the component accepting both will either make a f7-icon or a oh-icon, the latter being basically a plain img (openhab-webui/oh-icon.vue at main · openhab/openhab-webui · GitHub) - and therefore the features around them differ.
For the URL part, how to test if the URL is valid one before using it?
i’m trying to fetch an image to be used as the icon based on the item name, but i want to have a default image if the item name doesn’t have a valid image.
As i’m passing this within the url(xxxxx) section, how can i test it first that the image exists in the style section before using the variable?
currently i have it like this: