File tree 3 files changed +20
-2
lines changed
contexts/themeContext/utils
3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ const FileUploadPreviewWithContext = <
161
161
} ) ) ,
162
162
) ;
163
163
// eslint-disable-next-line react-hooks/exhaustive-deps
164
- } , [ fileUploads . length ] ) ;
164
+ } , [ fileUploads ] ) ;
165
165
166
166
// Handler triggered when an audio is loaded in the message input. The initial state is defined for the audio here and the duration is set.
167
167
const onLoad = ( index : string , duration : number ) => {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
12
12
MessagesContextValue ,
13
13
useMessagesContext ,
14
14
} from '../../contexts/messagesContext/MessagesContext' ;
15
+ import { useTheme } from '../../contexts/themeContext/ThemeContext' ;
15
16
import { DefaultStreamChatGenerics } from '../../types/types' ;
16
17
import { BottomSheetModal } from '../UIComponents/BottomSheetModal' ;
17
18
@@ -96,10 +97,23 @@ export const MessageMenu = <
96
97
propMessageUserReactionsAvatar ?? contextMessageUserReactionsAvatar ;
97
98
const MessageUserReactionsItem = propMessageUserReactionsItem ?? contextMessageUserReactionsItem ;
98
99
const message = propMessage ?? contextMessage ;
100
+ const {
101
+ theme : {
102
+ messageMenu : {
103
+ bottomSheet : { height : bottomSheetHeight } ,
104
+ } ,
105
+ } ,
106
+ } = useTheme ( ) ;
99
107
100
108
return (
101
109
< BottomSheetModal
102
- height = { messageActions . length === 0 && ! showMessageReactions ? height / 5 : height / 2 }
110
+ height = {
111
+ bottomSheetHeight
112
+ ? bottomSheetHeight
113
+ : messageActions . length === 0 && ! showMessageReactions
114
+ ? height / 5
115
+ : height / 2
116
+ }
103
117
onClose = { dismissOverlay }
104
118
visible = { visible }
105
119
>
Original file line number Diff line number Diff line change @@ -450,6 +450,9 @@ export type Theme = {
450
450
icon : ViewStyle ;
451
451
title : TextStyle ;
452
452
} ;
453
+ bottomSheet : {
454
+ height ?: number ;
455
+ } ;
453
456
reactionButton : {
454
457
filledColor : ColorValue ;
455
458
unfilledColor : ColorValue ;
@@ -1207,6 +1210,7 @@ export const defaultTheme: Theme = {
1207
1210
icon : { } ,
1208
1211
title : { } ,
1209
1212
} ,
1213
+ bottomSheet : { } ,
1210
1214
reactionButton : {
1211
1215
filledColor : Colors . accent_blue ,
1212
1216
unfilledColor : Colors . grey ,
You can’t perform that action at this time.
0 commit comments