Skip to content

Commit bccfcce

Browse files
committed
fix: add theme for the bottom sheet styles and message user reactions item
1 parent ab21961 commit bccfcce

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

package/src/components/MessageMenu/MessageUserReactionsItem.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ export const MessageUserReactionsItem = <
3737
messageMenu: {
3838
userReactions: {
3939
avatarContainer,
40+
avatarInnerContainer,
4041
avatarName,
42+
avatarNameContainer,
4143
avatarSize,
4244
radius,
4345
reactionBubbleBackground,
@@ -69,7 +71,7 @@ export const MessageUserReactionsItem = <
6971
accessibilityLabel='Individual User Reaction on long press message'
7072
style={[styles.avatarContainer, avatarContainer]}
7173
>
72-
<View style={styles.avatarInnerContainer}>
74+
<View style={[styles.avatarInnerContainer, avatarInnerContainer]}>
7375
<MessageUserReactionsAvatar reaction={reaction} size={avatarSize} />
7476
<View
7577
style={[
@@ -91,7 +93,7 @@ export const MessageUserReactionsItem = <
9193
/>
9294
</View>
9395
</View>
94-
<View style={styles.avatarNameContainer}>
96+
<View style={[styles.avatarNameContainer, avatarNameContainer]}>
9597
<Text numberOfLines={2} style={[styles.avatarName, { color: black }, avatarName]}>
9698
{name}
9799
</Text>

package/src/components/UIComponents/BottomSheetModal.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
4545
const { children, height = windowHeight / 2, onClose, visible } = props;
4646
const {
4747
theme: {
48+
bottomSheetModal: { container, contentContainer, handle, overlay: overlayTheme },
4849
colors: { grey, overlay, white_snow },
4950
},
5051
} = useTheme();
@@ -121,7 +122,7 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
121122
<Modal animationType='fade' onRequestClose={handleDismiss} transparent visible={visible}>
122123
<GestureHandlerRootView style={{ flex: 1 }}>
123124
<TouchableWithoutFeedback onPress={handleDismiss}>
124-
<View style={[styles.overlay, { backgroundColor: overlay }]}>
125+
<View style={[styles.overlay, { backgroundColor: overlay }, overlayTheme]}>
125126
<GestureDetector gesture={gesture}>
126127
<Animated.View
127128
style={[
@@ -131,10 +132,13 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
131132
height,
132133
transform: [{ translateY }],
133134
},
135+
container,
134136
]}
135137
>
136-
<View style={[styles.handle, { backgroundColor: grey, width: windowWidth / 4 }]} />
137-
<View style={styles.contentContainer}>{children}</View>
138+
<View
139+
style={[styles.handle, { backgroundColor: grey, width: windowWidth / 4 }, handle]}
140+
/>
141+
<View style={[styles.contentContainer, contentContainer]}>{children}</View>
138142
</Animated.View>
139143
</GestureDetector>
140144
</View>

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ export type Theme = {
122122
presenceIndicator: CircleProps;
123123
presenceIndicatorContainer: ViewStyle;
124124
};
125+
bottomSheetModal: {
126+
container: ViewStyle;
127+
contentContainer: ViewStyle;
128+
handle: ViewStyle;
129+
overlay: ViewStyle;
130+
};
125131
channel: {
126132
selectChannel: TextStyle;
127133
};
@@ -436,7 +442,9 @@ export type Theme = {
436442
};
437443
userReactions: {
438444
avatarContainer: ViewStyle;
445+
avatarInnerContainer: ViewStyle;
439446
avatarName: TextStyle;
447+
avatarNameContainer: ViewStyle;
440448
avatarSize: number;
441449
container: ViewStyle;
442450
contentContainer: ViewStyle;
@@ -852,6 +860,12 @@ export const defaultTheme: Theme = {
852860
},
853861
presenceIndicatorContainer: {},
854862
},
863+
bottomSheetModal: {
864+
container: {},
865+
contentContainer: {},
866+
handle: {},
867+
overlay: {},
868+
},
855869
channel: {
856870
selectChannel: {},
857871
},
@@ -1161,7 +1175,9 @@ export const defaultTheme: Theme = {
11611175
},
11621176
userReactions: {
11631177
avatarContainer: {},
1178+
avatarInnerContainer: {},
11641179
avatarName: {},
1180+
avatarNameContainer: {},
11651181
avatarSize: 64,
11661182
container: {},
11671183
contentContainer: {},

0 commit comments

Comments
 (0)