Skip to content

Commit 5e9f1d4

Browse files
committed
feat: add theme properties for message user reaction item
1 parent ef5474c commit 5e9f1d4

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

package/src/components/MessageMenu/MessageUserReactionsItem.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,21 @@ export const MessageUserReactionsItem = ({
3232
const { id, name, type } = reaction;
3333
const {
3434
theme: {
35-
colors: { accent_blue, black, grey, grey_gainsboro, white },
35+
colors: { black, grey_gainsboro, white },
3636
messageMenu: {
3737
userReactions: {
3838
avatarContainer,
3939
avatarInnerContainer,
4040
avatarName,
4141
avatarNameContainer,
4242
avatarSize,
43+
filledBackgroundColor,
44+
iconFilledColor,
45+
iconUnFilledColor,
4346
radius,
4447
reactionBubbleBackground,
4548
reactionBubbleBorderRadius,
49+
unfilledBackgroundColor,
4650
},
4751
},
4852
},
@@ -76,7 +80,8 @@ export const MessageUserReactionsItem = ({
7680
style={[
7781
styles.reactionBubbleBackground,
7882
{
79-
backgroundColor: grey_gainsboro,
83+
backgroundColor:
84+
alignment === 'left' ? filledBackgroundColor : unfilledBackgroundColor,
8085
borderColor: alignment === 'left' ? white : grey_gainsboro,
8186
borderWidth: radius / 2,
8287
left,
@@ -87,7 +92,7 @@ export const MessageUserReactionsItem = ({
8792
>
8893
<Icon
8994
height={reactionBubbleBorderRadius / 2}
90-
pathFill={alignment === 'left' ? accent_blue : grey}
95+
pathFill={alignment === 'left' ? iconFilledColor : iconUnFilledColor}
9196
width={reactionBubbleBorderRadius / 2}
9297
/>
9398
</View>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,15 +471,19 @@ export type Theme = {
471471
avatarSize: number;
472472
container: ViewStyle;
473473
contentContainer: ViewStyle;
474+
filledBackgroundColor: ColorValue;
474475
flatlistColumnContainer: ViewStyle;
475476
flatlistContainer: ViewStyle;
477+
iconFilledColor: ColorValue;
478+
iconUnFilledColor: ColorValue;
476479
radius: number;
477480
reactionBubble: ViewStyle;
478481
reactionBubbleBackground: ViewStyle;
479482
reactionBubbleBorderRadius: number;
480483
reactionSelectorContainer: ViewStyle;
481484
reactionsText: TextStyle;
482485
title: TextStyle;
486+
unfilledBackgroundColor: ColorValue;
483487
};
484488
};
485489
messageSimple: {
@@ -1235,15 +1239,19 @@ export const defaultTheme: Theme = {
12351239
avatarSize: 64,
12361240
container: {},
12371241
contentContainer: {},
1242+
filledBackgroundColor: Colors.light_blue,
12381243
flatlistColumnContainer: {},
12391244
flatlistContainer: {},
1245+
iconFilledColor: Colors.accent_blue,
1246+
iconUnFilledColor: Colors.grey,
12401247
radius: 2,
12411248
reactionBubble: {},
12421249
reactionBubbleBackground: {},
12431250
reactionBubbleBorderRadius: 24,
12441251
reactionSelectorContainer: {},
12451252
reactionsText: {},
12461253
title: {},
1254+
unfilledBackgroundColor: Colors.grey_gainsboro,
12471255
},
12481256
},
12491257
messageSimple: {

0 commit comments

Comments
 (0)