1- import React , { memo , useEffect , useCallback } from 'react' ;
2- import type { LayoutChangeEvent } from 'react-native' ;
3- import Animated from 'react-native-reanimated' ;
1+ import React , { memo , useEffect , useCallback , useMemo } from 'react' ;
2+ import { type LayoutChangeEvent , View } from 'react-native' ;
43import { SCROLLABLE_TYPE } from '../../constants' ;
54import {
65 useBottomSheetContentContainerStyle ,
76 useBottomSheetInternal ,
87} from '../../hooks' ;
98import { print } from '../../utilities' ;
9+ import { styles } from './styles' ;
1010import type { BottomSheetViewProps } from './types' ;
1111
1212function BottomSheetViewComponent ( {
1313 focusHook : useFocusHook = useEffect ,
1414 enableFooterMarginAdjustment = false ,
1515 onLayout,
16- style,
16+ style : _providedStyle ,
1717 children,
1818 ...rest
1919} : BottomSheetViewProps ) {
@@ -29,7 +29,11 @@ function BottomSheetViewComponent({
2929 //#region styles
3030 const containerStyle = useBottomSheetContentContainerStyle (
3131 enableFooterMarginAdjustment ,
32- style
32+ _providedStyle
33+ ) ;
34+ const style = useMemo (
35+ ( ) => [ containerStyle , styles . container ] ,
36+ [ containerStyle ]
3337 ) ;
3438 //#endregion
3539
@@ -69,9 +73,9 @@ function BottomSheetViewComponent({
6973
7074 //render
7175 return (
72- < Animated . View { ...rest } onLayout = { handleLayout } style = { containerStyle } >
76+ < View { ...rest } onLayout = { handleLayout } style = { style } >
7377 { children }
74- </ Animated . View >
78+ </ View >
7579 ) ;
7680}
7781
0 commit comments