FlowingCode/AppLayoutAddon

Enhance MenuItem methods for setting icons

javier-godoy opened this issue · 1 comments

Current API for setting icons is too cumbersome or requires passing icon names as string, e.g.:

new MenuItem("Content", "vaadin:book", ... );
new MenuItem("Content", VaadinIcon.BOOK.create().getElement().getAttribute("icon"), ... );

A new constructor was added to MenuItem class, accepting an argument of type VaadinIcon

new MenuItem("Content", VaadinIcon.BOOK, ... )