Skip to content

Commit 7e64290

Browse files
authored
fix: add sender and receiver background color for message bubble in message overlay (#2710)
1 parent 546272a commit 7e64290

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

package/src/components/MessageOverlay/MessageOverlay.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,14 @@ const MessageOverlayWithContext = <
168168
);
169169

170170
const {
171-
colors: { blue_alice, grey_gainsboro, grey_whisper, transparent, white_smoke },
171+
colors: { blue_alice, grey_gainsboro, grey_whisper, transparent },
172172
messageSimple: {
173173
content: {
174174
container: { borderRadiusL, borderRadiusS },
175175
containerInner,
176+
receiverMessageBackgroundColor,
176177
replyContainer,
178+
senderMessageBackgroundColor,
177179
},
178180
},
179181
overlay: { container: containerStyle, padding: overlayPadding },
@@ -360,8 +362,8 @@ const MessageOverlayWithContext = <
360362
: grey_gainsboro
361363
: blue_alice
362364
: alignment === 'left'
363-
? white_smoke
364-
: grey_gainsboro,
365+
? receiverMessageBackgroundColor
366+
: senderMessageBackgroundColor,
365367
borderBottomLeftRadius:
366368
(groupStyle === 'left_bottom' || groupStyle === 'left_single') &&
367369
(!hasThreadReplies || threadList)

package/src/contexts/themeContext/utils/theme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,10 @@ export const defaultTheme: Theme = {
10961096
metaText: {
10971097
fontSize: 12,
10981098
},
1099+
receiverMessageBackgroundColor: Colors.white,
10991100
replyBorder: {},
11001101
replyContainer: {},
1102+
senderMessageBackgroundColor: Colors.grey_gainsboro,
11011103
textContainer: {
11021104
onlyEmojiMarkdown: { text: { fontSize: 50 } },
11031105
},

0 commit comments

Comments
 (0)