fix avatar username relative alignment

This commit is contained in:
Ajay Bura 2025-09-17 21:53:54 +05:30
parent 1a26427373
commit 5422958e54
2 changed files with 8 additions and 3 deletions

View file

@ -791,7 +791,9 @@ export const Message = as<'div', MessageProps>(
); );
const avatarJSX = !collapse && messageLayout !== MessageLayout.Compact && ( const avatarJSX = !collapse && messageLayout !== MessageLayout.Compact && (
<AvatarBase> <AvatarBase
className={messageLayout === MessageLayout.Bubble ? css.BubbleAvatarBase : undefined}
>
<Avatar <Avatar
className={css.MessageAvatar} className={css.MessageAvatar}
as="button" as="button"
@ -1141,8 +1143,7 @@ export const Message = as<'div', MessageProps>(
</CompactLayout> </CompactLayout>
)} )}
{messageLayout === MessageLayout.Bubble && ( {messageLayout === MessageLayout.Bubble && (
<BubbleLayout before={avatarJSX} onContextMenu={handleContextMenu}> <BubbleLayout before={avatarJSX} header={headerJSX} onContextMenu={handleContextMenu}>
{headerJSX}
{msgContentJSX} {msgContentJSX}
</BubbleLayout> </BubbleLayout>
)} )}

View file

@ -24,6 +24,10 @@ export const MessageOptionsBar = style([
}, },
]); ]);
export const BubbleAvatarBase = style({
paddingTop: toRem(6),
});
export const MessageAvatar = style({ export const MessageAvatar = style({
cursor: 'pointer', cursor: 'pointer',
}); });