how to use icons that are not listed in `IconName`
Closed this issue · 4 comments
Thanks for this binding. It is quite nice!
While playing around with using icons in SideNavigationItem
, I noticed that a number of icons that are available in ui5, such as calendar
and locate-me
, are not present in IconName
. I tried a couple hacks but was unable to find a way to use those icons in my code. Am I missing something? It seems that I'm suck using only what is listed in the IconName
config key, is that right?
Ack, I'm sorry to waste your time--I figured out a reasonable way to do it. In case anyone else was wondering though:
val icon = customProp("icon",StringAsIsCodec)
...
SideNavigationItem(
_.text := "Useful Links",
_ => icon := "chain-link",
)
The _ => icon
part is necessary because the items want a Mod
, which is usually a function.
I was actually faster than intended :) You should have all icons by using the new release.
Excellent, thank you! Works perfectly.