use of com.vaadin.flow.component.html.Header in project isis-lab by apache-isis-committers.
the class _TopMenuLayout method createHeaderContent.
Component createHeaderContent(final Iterable<MenuItemInfo> menuItems) {
Header header = new Header();
header.addClassNames("bg-base", "border-b", "border-contrast-10", "box-border", "flex", "flex-col", "w-full");
Div layout = new Div();
layout.addClassNames("flex", "h-xl", "items-center", "px-l");
H1 appName = new H1("isis-lab-experiments-layout");
appName.addClassNames("my-0", "me-auto", "text-l");
layout.add(appName);
Nav nav = new Nav();
nav.addClassNames("flex", "gap-s", "overflow-auto", "px-m");
// Wrap the links in a list; improves accessibility
UnorderedList list = new UnorderedList();
list.addClassNames("flex", "list-none", "m-0", "p-0");
nav.add(list);
menuItems.forEach(list::add);
header.add(layout, nav);
return header;
}
Aggregations