Search in sources :

Example 1 with Card

use of com.github.appreciated.card.Card in project vaadin-app-layout by appreciated.

the class NotificationsOverlayView method initViews.

private void initViews() {
    views.clear();
    if (holder.getNotificationSize() > 0) {
        views.addAll(this.holder.getNotificationCards());
    } else {
        noNotificationsLabel = new Label(noNotificationText);
        noNotificationsLabel.getStyle().set("color", "var(--app-layout-notification-font-color)").set("font-size", "var(--app-layout-font-size-menu)");
        VerticalLayout labelWrapper = new VerticalLayout(noNotificationsLabel);
        labelWrapper.setAlignItems(FlexComponent.Alignment.CENTER);
        labelWrapper.setJustifyContentMode(FlexComponent.JustifyContentMode.CENTER);
        Card wrapper = new Card(labelWrapper);
        wrapper.setWidthFull();
        wrapper.setBackground("var(--lumo-base-color)");
        wrapper.setWidth("100%");
        wrapper.setJustifyContentMode(FlexComponent.JustifyContentMode.CENTER);
        views.add(wrapper);
    }
}
Also used : Label(com.vaadin.flow.component.html.Label) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) Card(com.github.appreciated.card.Card)

Aggregations

Card (com.github.appreciated.card.Card)1 Label (com.vaadin.flow.component.html.Label)1 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)1