Skip to content

Commit

Permalink
fix: add sender and receiver background color for message bubble in m…
Browse files Browse the repository at this point in the history
…essage overlay (#2710)
  • Loading branch information
khushal87 authored Oct 17, 2024
1 parent 546272a commit 7e64290
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package/src/components/MessageOverlay/MessageOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,14 @@ const MessageOverlayWithContext = <
);

const {
colors: { blue_alice, grey_gainsboro, grey_whisper, transparent, white_smoke },
colors: { blue_alice, grey_gainsboro, grey_whisper, transparent },
messageSimple: {
content: {
container: { borderRadiusL, borderRadiusS },
containerInner,
receiverMessageBackgroundColor,
replyContainer,
senderMessageBackgroundColor,
},
},
overlay: { container: containerStyle, padding: overlayPadding },
Expand Down Expand Up @@ -360,8 +362,8 @@ const MessageOverlayWithContext = <
: grey_gainsboro
: blue_alice
: alignment === 'left'
? white_smoke
: grey_gainsboro,
? receiverMessageBackgroundColor
: senderMessageBackgroundColor,
borderBottomLeftRadius:
(groupStyle === 'left_bottom' || groupStyle === 'left_single') &&
(!hasThreadReplies || threadList)
Expand Down
2 changes: 2 additions & 0 deletions package/src/contexts/themeContext/utils/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1096,8 +1096,10 @@ export const defaultTheme: Theme = {
metaText: {
fontSize: 12,
},
receiverMessageBackgroundColor: Colors.white,
replyBorder: {},
replyContainer: {},
senderMessageBackgroundColor: Colors.grey_gainsboro,
textContainer: {
onlyEmojiMarkdown: { text: { fontSize: 50 } },
},
Expand Down

0 comments on commit 7e64290

Please sign in to comment.