File tree Expand file tree Collapse file tree 3 files changed +7
-16
lines changed
package/src/contexts/overlayContext Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import {
1717 useOverlayContext ,
1818 useTheme ,
1919} from 'stream-chat-react-native' ;
20- import type { MessageOverlayBackgroundProps } from 'stream-chat-react-native' ;
2120
2221import { getMessaging } from '@react-native-firebase/messaging' ;
2322import notifee , { EventType } from '@notifee/react-native' ;
@@ -99,7 +98,7 @@ const Drawer = createDrawerNavigator();
9998const Stack = createNativeStackNavigator < StackNavigatorParamList > ( ) ;
10099const UserSelectorStack = createNativeStackNavigator < UserSelectorParamList > ( ) ;
101100
102- const MessageOverlayBlurBackground = ( { style } : MessageOverlayBackgroundProps ) => {
101+ const MessageOverlayBlurBackground = ( ) => {
103102 const {
104103 theme : { semantics } ,
105104 } = useTheme ( ) ;
@@ -116,7 +115,7 @@ const MessageOverlayBlurBackground = ({ style }: MessageOverlayBackgroundProps)
116115 downsampleFactor = { isIOS ? undefined : 12 }
117116 pointerEvents = 'none'
118117 reducedTransparencyFallbackColor = 'rgba(0, 0, 0, 0.8)'
119- style = { [ styles . messageOverlayBlurBackground , style ] }
118+ style = { styles . messageOverlayBlurBackground }
120119 />
121120 < View
122121 style = { [
Original file line number Diff line number Diff line change 33 Platform ,
44 Pressable ,
55 StyleSheet ,
6- useColorScheme ,
76 useWindowDimensions ,
87 View ,
98} from 'react-native' ;
@@ -20,7 +19,6 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
2019import { PortalHost } from 'react-native-teleport' ;
2120
2221import { ClosingPortalHostsLayer } from './ClosingPortalHostsLayer' ;
23- import type { MessageOverlayBackgroundProps } from './OverlayContext' ;
2422
2523import {
2624 closeOverlay ,
@@ -33,13 +31,13 @@ import { useTheme } from '../themeContext/ThemeContext';
3331
3432const DURATION = 300 ;
3533
36- const DefaultMessageOverlayBackground = ( { style } : MessageOverlayBackgroundProps ) => {
34+ const DefaultMessageOverlayBackground = ( ) => {
3735 const {
3836 theme : { semantics } ,
3937 } = useTheme ( ) ;
4038
4139 return (
42- < View pointerEvents = 'none' style = { [ StyleSheet . absoluteFillObject , style ] } >
40+ < View pointerEvents = 'none' style = { StyleSheet . absoluteFillObject } >
4341 < View
4442 pointerEvents = 'none'
4543 style = { [
@@ -54,7 +52,7 @@ const DefaultMessageOverlayBackground = ({ style }: MessageOverlayBackgroundProp
5452} ;
5553
5654type MessageOverlayHostLayerProps = {
57- BackgroundComponent ?: React . ComponentType < MessageOverlayBackgroundProps > ;
55+ BackgroundComponent ?: React . ComponentType ;
5856} ;
5957
6058export const MessageOverlayHostLayer = ( { BackgroundComponent } : MessageOverlayHostLayerProps ) => {
@@ -271,7 +269,7 @@ export const MessageOverlayHostLayer = ({ BackgroundComponent }: MessageOverlayH
271269 pointerEvents = 'none'
272270 style = { [ StyleSheet . absoluteFillObject , backdropStyle ] }
273271 >
274- < OverlayBackground overlayOpacity = { backdrop } style = { StyleSheet . absoluteFillObject } />
272+ < OverlayBackground />
275273 </ Animated . View >
276274 ) : null }
277275
Original file line number Diff line number Diff line change 11import React , { useContext } from 'react' ;
22
3- import { StyleProp , ViewStyle } from 'react-native' ;
43import { SharedValue } from 'react-native-reanimated' ;
54
65import type { Streami18n } from '../../utils/i18n/Streami18n' ;
@@ -12,10 +11,6 @@ import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
1211import { isTestEnvironment } from '../utils/isTestEnvironment' ;
1312
1413export type Overlay = 'alert' | 'gallery' | 'none' ;
15- export type MessageOverlayBackgroundProps = {
16- overlayOpacity : SharedValue < number > ;
17- style ?: StyleProp < ViewStyle > ;
18- } ;
1914
2015export type OverlayContextValue = {
2116 overlay : Overlay ;
@@ -33,9 +28,8 @@ export type OverlayProviderProps = ImageGalleryProviderProps & {
3328 i18nInstance ?: Streami18n ;
3429 /**
3530 * Custom backdrop component rendered behind overlay content in `MessageOverlayHostLayer`.
36- * Receives a shared opacity value that should be used for its visibility animation.
3731 */
38- MessageOverlayBackground ?: React . ComponentType < MessageOverlayBackgroundProps > ;
32+ MessageOverlayBackground ?: React . ComponentType ;
3933 value ?: Partial < OverlayContextValue > ;
4034} ;
4135
You can’t perform that action at this time.
0 commit comments