Skip to content

Commit

Permalink
refactor(demo): update demo to use label support
Browse files Browse the repository at this point in the history
  • Loading branch information
paodb authored and javier-godoy committed May 14, 2024
1 parent 0494979 commit 394c89d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public ReadOnlyBinderDemo() {
IntStream.rangeClosed(1, 12).mapToObj(i -> "ROLE" + i).collect(Collectors.toList());
rolesComboBox.setItems(roles);

rolesBadgeList = new BadgeList();
rolesBadgeList = new BadgeList("Roles");
readonlyBadgeList = new ReadOnlyHasValue<List<Badge>>(rolesBadgeList::setBadges);

binder = new Binder<>();
Expand All @@ -81,9 +81,6 @@ public ReadOnlyBinderDemo() {
buttonsLayout.setJustifyContentMode(JustifyContentMode.END);

VerticalLayout layout = new VerticalLayout();
Span span = new Span("Roles");
span.addClassName("readonly-badge-list-label");
rolesBadgeListDiv.add(span);
rolesBadgeListDiv.setWidth("450px");
rolesBadgeListDiv.add(rolesBadgeList);
layout.add(firstName, lastName, rolesComboBox, rolesBadgeListDiv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,3 @@ fc-badge-list[class="styled-badges-second-example"]::part(overflow-badge), .cust
border: 1px green dashed;
border-radius: 0;
}

.readonly-badge-list-label {
color: var(--lumo-secondary-text-color);
font-weight: 500;
font-size: var(--lumo-font-size-s);
}

0 comments on commit 394c89d

Please sign in to comment.