Skip to content

Commit e3adb9a

Browse files
committed
fix: regression in theme default value colors
1 parent ee41381 commit e3adb9a

File tree

5 files changed

+31
-43
lines changed

5 files changed

+31
-43
lines changed

package/src/components/Message/Message.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
279279
const { client } = chatContext;
280280
const {
281281
theme: {
282-
colors: { targetedMessageBackground },
283-
messageSimple: { targetedMessageContainer, unreadUnderlayColor, wrapper },
282+
colors: { targetedMessageBackground, bg_gradient_start },
283+
messageSimple: { targetedMessageContainer, unreadUnderlayColor = bg_gradient_start, wrapper },
284284
screenPadding,
285285
},
286286
} = useTheme();

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ export const ReactionListBottomItem = (props: ReactionListBottomItemProps) => {
6060
const scaleValue = useRef(new Animated.Value(1)).current;
6161
const {
6262
theme: {
63-
colors: { black },
63+
colors: { accent_blue, black, light_blue, grey, grey_gainsboro },
6464
messageSimple: {
6565
reactionListBottom: {
6666
item: {
6767
container,
6868
countText,
69-
filledBackgroundColor,
69+
filledBackgroundColor = light_blue,
7070
icon,
71-
iconFillColor,
71+
iconFillColor = accent_blue,
7272
iconSize,
73-
iconUnFillColor,
74-
unfilledBackgroundColor,
73+
iconUnFillColor = grey,
74+
unfilledBackgroundColor = grey_gainsboro,
7575
},
7676
},
7777
},

package/src/components/MessageMenu/MessageUserReactionsItem.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ export const MessageUserReactionsItem = ({
3232
const { id, name, type } = reaction;
3333
const {
3434
theme: {
35-
colors: { black, grey_gainsboro, white },
35+
colors: { accent_blue, black, grey, grey_gainsboro, light_blue, white },
3636
messageMenu: {
3737
userReactions: {
3838
avatarContainer,
3939
avatarInnerContainer,
4040
avatarName,
4141
avatarNameContainer,
4242
avatarSize,
43-
filledBackgroundColor,
44-
iconFilledColor,
45-
iconUnFilledColor,
43+
filledBackgroundColor = light_blue,
44+
iconFilledColor = accent_blue,
45+
iconUnFilledColor = grey,
4646
radius,
4747
reactionBubbleBackground,
4848
reactionBubbleBorderRadius,
49-
unfilledBackgroundColor,
49+
unfilledBackgroundColor = grey_gainsboro,
5050
},
5151
},
5252
},

package/src/components/MessageMenu/ReactionButton.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ export const ReactionButton = (props: ReactionButtonProps) => {
2929
const { Icon, onPress, selected, type } = props;
3030
const {
3131
theme: {
32+
colors: { light_blue, accent_blue, white, grey },
3233
messageMenu: {
3334
reactionButton: {
34-
filledBackgroundColor,
35-
filledColor,
36-
unfilledBackgroundColor,
37-
unfilledColor,
35+
filledBackgroundColor = light_blue,
36+
filledColor = accent_blue,
37+
unfilledBackgroundColor = white,
38+
unfilledColor = grey,
3839
},
3940
reactionPicker: { buttonContainer, reactionIconSize },
4041
},

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

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,10 @@ export type Theme = {
478478
height?: number;
479479
};
480480
reactionButton: {
481-
filledColor: ColorValue;
482-
unfilledColor: ColorValue;
483-
filledBackgroundColor: ColorValue;
484-
unfilledBackgroundColor: ColorValue;
481+
filledColor?: ColorValue;
482+
unfilledColor?: ColorValue;
483+
filledBackgroundColor?: ColorValue;
484+
unfilledBackgroundColor?: ColorValue;
485485
};
486486
reactionPicker: {
487487
buttonContainer: ViewStyle;
@@ -497,19 +497,19 @@ export type Theme = {
497497
avatarSize: number;
498498
container: ViewStyle;
499499
contentContainer: ViewStyle;
500-
filledBackgroundColor: ColorValue;
500+
filledBackgroundColor?: ColorValue;
501501
flatlistColumnContainer: ViewStyle;
502502
flatlistContainer: ViewStyle;
503-
iconFilledColor: ColorValue;
504-
iconUnFilledColor: ColorValue;
503+
iconFilledColor?: ColorValue;
504+
iconUnFilledColor?: ColorValue;
505505
radius: number;
506506
reactionBubble: ViewStyle;
507507
reactionBubbleBackground: ViewStyle;
508508
reactionBubbleBorderRadius: number;
509509
reactionSelectorContainer: ViewStyle;
510510
reactionsText: TextStyle;
511511
title: TextStyle;
512-
unfilledBackgroundColor: ColorValue;
512+
unfilledBackgroundColor?: ColorValue;
513513
};
514514
};
515515
messagePreview: {
@@ -660,12 +660,12 @@ export type Theme = {
660660
item: {
661661
container: ViewStyle;
662662
countText: TextStyle;
663-
filledBackgroundColor: ColorValue;
663+
filledBackgroundColor?: ColorValue;
664664
icon: ViewStyle;
665-
iconFillColor: ColorValue;
665+
iconFillColor?: ColorValue;
666666
iconSize: number;
667-
iconUnFillColor: ColorValue;
668-
unfilledBackgroundColor: ColorValue;
667+
iconUnFillColor?: ColorValue;
668+
unfilledBackgroundColor?: ColorValue;
669669
};
670670
};
671671
reactionListTop: {
@@ -1275,12 +1275,7 @@ export const defaultTheme: Theme = {
12751275
title: {},
12761276
},
12771277
bottomSheet: {},
1278-
reactionButton: {
1279-
filledBackgroundColor: Colors.light_blue,
1280-
filledColor: Colors.accent_blue,
1281-
unfilledBackgroundColor: Colors.white,
1282-
unfilledColor: Colors.grey,
1283-
},
1278+
reactionButton: {},
12841279
reactionPicker: {
12851280
buttonContainer: {},
12861281
container: {},
@@ -1295,19 +1290,15 @@ export const defaultTheme: Theme = {
12951290
avatarSize: 64,
12961291
container: {},
12971292
contentContainer: {},
1298-
filledBackgroundColor: Colors.light_blue,
12991293
flatlistColumnContainer: {},
13001294
flatlistContainer: {},
1301-
iconFilledColor: Colors.accent_blue,
1302-
iconUnFilledColor: Colors.grey,
13031295
radius: 2,
13041296
reactionBubble: {},
13051297
reactionBubbleBackground: {},
13061298
reactionBubbleBorderRadius: 24,
13071299
reactionSelectorContainer: {},
13081300
reactionsText: {},
13091301
title: {},
1310-
unfilledBackgroundColor: Colors.grey_gainsboro,
13111302
},
13121303
},
13131304
messagePreview: {
@@ -1481,12 +1472,8 @@ export const defaultTheme: Theme = {
14811472
item: {
14821473
container: {},
14831474
countText: {},
1484-
filledBackgroundColor: Colors.light_blue,
14851475
icon: {},
1486-
iconFillColor: Colors.accent_blue,
14871476
iconSize: 16,
1488-
iconUnFillColor: Colors.grey,
1489-
unfilledBackgroundColor: Colors.grey_gainsboro,
14901477
},
14911478
},
14921479
reactionListTop: {
@@ -1533,7 +1520,7 @@ export const defaultTheme: Theme = {
15331520
container: {},
15341521
},
15351522
targetedMessageContainer: {},
1536-
unreadUnderlayColor: Colors.bg_gradient_start,
1523+
unreadUnderlayColor: undefined,
15371524
videoThumbnail: {
15381525
container: {},
15391526
roundedView: {},

0 commit comments

Comments
 (0)