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
MarcinVaadin
changed the title
[FEATURE] Support icon enums (VaadinIcon) in @Menu
[FEATURE] Make it more convenient to use VaadinIcons in @Menu
Dec 4, 2024
What's needed instead is that the icon set needs to be expose string constants with the URIs to use. It cannot be a method call but it needs to be an actual static final field. It could then be like @Menu(title = "Hello", order = 1, icon = VaadinIconUrl.CIRCLE).
I'm moving the issue to the repo where VaadinIcon is defined.
Describe your motivation
When working with
@Menu
and wanted to set icon, it was natural for me to useVaadinIcon
, but there is no simple way to do that.I would expect something like:
@Menu(title = "Hello", order = 1, icon = VaadinIcon.CIRCLE.toIconString())
Currently I must use string value:
@Menu(title = "Hello", order = 1, icon = "vaadin:circle")
Desired solution
Would be handy if
VaadinIcon
enum had.toIconString()
which returnsvaadin: -name-
or similar.The text was updated successfully, but these errors were encountered: