Skip to content

Commit 9f562b1

Browse files
Karthik-B-06crstnmac
authored andcommitted
fix(avatar): ⚡ resolve avatar stacking issue by setting zIndex values
1 parent 2b8b7f2 commit 9f562b1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/avatar-group/AvatarGroup.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export const AvatarGroup: React.FC<Partial<AvatarGroupProps>> = props => {
7777
showRing
7878
? { borderColor: ringColor, backgroundColor: ringColor }
7979
: {},
80+
{ zIndex: childrenWithinMax.length - index },
8081
]}
8182
key={index}
8283
>

src/theme/defaultTheme/avatar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const avatar = {
117117
},
118118
},
119119
group: {
120-
base: "flex-row items-center",
120+
base: "relative flex-row items-center",
121121
avatarWrapper: {
122122
ringStyle: "border-2",
123123
circular: "rounded-full",

0 commit comments

Comments
 (0)