Skip to content

Commit e662147

Browse files
authored
feat: add HasOverlayClassName interface to AvatarGroup (#4509)
1 parent 608eb94 commit e662147

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎vaadin-avatar-flow-parent/vaadin-avatar-flow/src/main/java/com/vaadin/flow/component/avatar/AvatarGroup.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.vaadin.flow.component.Tag;
2323
import com.vaadin.flow.component.dependency.JsModule;
2424
import com.vaadin.flow.component.dependency.NpmPackage;
25+
import com.vaadin.flow.component.shared.HasOverlayClassName;
2526
import com.vaadin.flow.component.shared.HasThemeVariant;
2627
import com.vaadin.flow.internal.JsonSerializer;
2728
import com.vaadin.flow.internal.NodeOwner;
@@ -66,8 +67,8 @@
6667
@JsModule("@vaadin/polymer-legacy-adapter/style-modules.js")
6768
@JsModule("@vaadin/avatar-group/src/vaadin-avatar-group.js")
6869
@NpmPackage(value = "@vaadin/avatar-group", version = "24.0.0-alpha10")
69-
public class AvatarGroup extends Component
70-
implements HasStyle, HasSize, HasThemeVariant<AvatarGroupVariant> {
70+
public class AvatarGroup extends Component implements HasOverlayClassName,
71+
HasStyle, HasSize, HasThemeVariant<AvatarGroupVariant> {
7172

7273
/**
7374
* Item to be set as an avatar for the avatar group.

‎vaadin-avatar-flow-parent/vaadin-avatar-flow/src/test/java/com/vaadin/flow/component/avatar/tests/AvatarGroupTest.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.vaadin.flow.component.avatar.AvatarGroup.AvatarGroupItem;
2121
import com.vaadin.flow.component.avatar.AvatarGroupVariant;
2222
import com.vaadin.flow.component.avatar.AvatarVariant;
23+
import com.vaadin.flow.component.shared.HasOverlayClassName;
2324
import org.junit.Assert;
2425
import org.junit.Before;
2526
import org.junit.Test;
@@ -157,4 +158,10 @@ public void setI18n() {
157158
Assert.assertEquals(i18n, avatarGroup.getI18n());
158159
}
159160

161+
@Test
162+
public void implementsHasOverlayClassName() {
163+
Assert.assertTrue("AvatarGroup should support overlay class name",
164+
HasOverlayClassName.class
165+
.isAssignableFrom(new AvatarGroup().getClass()));
166+
}
160167
}

0 commit comments

Comments
 (0)