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

View file

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