Skip to content

Commit fa3d5c7

Browse files
nnaydenowNayden Naydenov
authored andcommitted
chore: correct usage of IAvatar (#8196)
Co-authored-by: Nayden Naydenov <[email protected]>
1 parent 7a1cd63 commit fa3d5c7

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

packages/main/src/AvatarGroup.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
isSpace,
1515
} from "@ui5/webcomponents-base/dist/Keys.js";
1616
import Button from "./Button.js";
17-
import type IAvatar from "./Avatar.js";
17+
import type { IAvatar } from "./Interfaces.js";
1818
import AvatarSize from "./types/AvatarSize.js";
1919
import AvatarGroupType from "./types/AvatarGroupType.js";
2020
import AvatarColorScheme from "./types/AvatarColorScheme.js";
@@ -373,11 +373,11 @@ class AvatarGroup extends UI5Element {
373373
return {
374374
overflowButton: {
375375
"ui5-avatar-group-overflow-btn": true,
376-
"ui5-avatar-group-overflow-btn-xs": this.firstAvatarSize === "XS",
377-
"ui5-avatar-group-overflow-btn-s": this.firstAvatarSize === "S",
378-
"ui5-avatar-group-overflow-btn-m": this.firstAvatarSize === "M",
379-
"ui5-avatar-group-overflow-btn-l": this.firstAvatarSize === "L",
380-
"ui5-avatar-group-overflow-btn-xl": this.firstAvatarSize === "XL",
376+
"ui5-avatar-group-overflow-btn-xs": this.firstAvatarSize === AvatarSize.XS,
377+
"ui5-avatar-group-overflow-btn-s": this.firstAvatarSize === AvatarSize.S,
378+
"ui5-avatar-group-overflow-btn-m": this.firstAvatarSize === AvatarSize.M,
379+
"ui5-avatar-group-overflow-btn-l": this.firstAvatarSize === AvatarSize.L,
380+
"ui5-avatar-group-overflow-btn-xl": this.firstAvatarSize === AvatarSize.XL,
381381
},
382382
};
383383
}

packages/main/src/Interfaces.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ import type TableMode from "./types/TableMode.js";
66
import type SemanticColor from "./types/SemanticColor.js";
77
import type Tab from "./Tab.js";
88
import type ListItemType from "./types/ListItemType.js";
9+
import type AvatarColorScheme from "./types/AvatarColorScheme.js";
10+
import AvatarSize from "./types/AvatarSize.js";
911

1012
/**
1113
* Interface for components that represent an avatar and may be slotted in numerous higher-order components such as <code>ui5-avatar-group</code>
1214
*
1315
* @public
1416
*/
15-
interface IAvatar extends HTMLElement {}
17+
interface IAvatar extends HTMLElement, ITabbable {
18+
_effectiveBackgroundColor: AvatarColorScheme;
19+
size: `${AvatarSize}`;
20+
_effectiveSize: AvatarSize;
21+
interactive: boolean;
22+
}
1623

1724
/**
1825
* Interface for components that may be used as a button inside numerous higher-order components

0 commit comments

Comments
 (0)