use of com.vaadin.flow.component.html.H3 in project flow by vaadin.
the class DemoView method addCard.
private Card addCard(String tabName, String tabUrl, String heading, Component... components) {
Div tab = tabComponents.computeIfAbsent(tabUrl, url -> {
navBar.addLink(tabName, getTabUrl(tabUrl));
return new Div();
});
if (heading != null && !heading.isEmpty()) {
tab.add(new H3(heading));
}
Card card = new Card();
if (components != null && components.length > 0) {
card.add(components);
}
List<SourceCodeExample> list = sourceCodeExamples.get(heading);
if (list != null) {
list.stream().map(this::createSourceContent).forEach(card::add);
}
tab.add(card);
return card;
}