Skip to content

Commit 7289934

Browse files
authored
fix: add filled and unfilled bg color theme properties for ReactionListBottom (#3100)
* fix: add filled and unfilled bg color theme properties for ReactionListBottom * feat: add theme properties for message user reaction item
1 parent 0af1a44 commit 7289934

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

package/src/components/Message/MessageSimple/ReactionList/ReactionListBottom.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,19 @@ export const ReactionListBottomItem = (props: ReactionListBottomItemProps) => {
6060
const scaleValue = useRef(new Animated.Value(1)).current;
6161
const {
6262
theme: {
63-
colors: { black, grey_gainsboro, light_blue },
63+
colors: { black },
6464
messageSimple: {
6565
reactionListBottom: {
66-
item: { container, countText, icon, iconFillColor, iconSize, iconUnFillColor },
66+
item: {
67+
container,
68+
countText,
69+
filledBackgroundColor,
70+
icon,
71+
iconFillColor,
72+
iconSize,
73+
iconUnFillColor,
74+
unfilledBackgroundColor,
75+
},
6776
},
6877
},
6978
},
@@ -134,7 +143,7 @@ export const ReactionListBottomItem = (props: ReactionListBottomItemProps) => {
134143
style={[
135144
styles.itemContainer,
136145
{
137-
backgroundColor: reaction.own ? light_blue : grey_gainsboro,
146+
backgroundColor: reaction.own ? filledBackgroundColor : unfilledBackgroundColor,
138147
transform: [{ scale: scaleValue }],
139148
},
140149
container,

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: 12 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: {
@@ -627,10 +631,12 @@ export type Theme = {
627631
item: {
628632
container: ViewStyle;
629633
countText: TextStyle;
634+
filledBackgroundColor: ColorValue;
630635
icon: ViewStyle;
631636
iconFillColor: ColorValue;
632637
iconSize: number;
633638
iconUnFillColor: ColorValue;
639+
unfilledBackgroundColor: ColorValue;
634640
};
635641
};
636642
reactionListTop: {
@@ -1233,15 +1239,19 @@ export const defaultTheme: Theme = {
12331239
avatarSize: 64,
12341240
container: {},
12351241
contentContainer: {},
1242+
filledBackgroundColor: Colors.light_blue,
12361243
flatlistColumnContainer: {},
12371244
flatlistContainer: {},
1245+
iconFilledColor: Colors.accent_blue,
1246+
iconUnFilledColor: Colors.grey,
12381247
radius: 2,
12391248
reactionBubble: {},
12401249
reactionBubbleBackground: {},
12411250
reactionBubbleBorderRadius: 24,
12421251
reactionSelectorContainer: {},
12431252
reactionsText: {},
12441253
title: {},
1254+
unfilledBackgroundColor: Colors.grey_gainsboro,
12451255
},
12461256
},
12471257
messageSimple: {
@@ -1412,10 +1422,12 @@ export const defaultTheme: Theme = {
14121422
item: {
14131423
container: {},
14141424
countText: {},
1425+
filledBackgroundColor: Colors.light_blue,
14151426
icon: {},
14161427
iconFillColor: Colors.accent_blue,
14171428
iconSize: 16,
14181429
iconUnFillColor: Colors.grey,
1430+
unfilledBackgroundColor: Colors.grey_gainsboro,
14191431
},
14201432
},
14211433
reactionListTop: {

0 commit comments

Comments
 (0)