1- import React , { memo , useMemo } from 'react' ;
1+ import React , { type ComponentProps , memo , useMemo } from 'react' ;
22import { Platform } from 'react-native' ;
33import Animated , { useAnimatedStyle } from 'react-native-reanimated' ;
44import { useBottomSheetInternal } from '../../hooks' ;
55import type { BottomSheetProps } from '../bottomSheet/types' ;
66import { styles } from './styles' ;
77
8- type BottomSheetBodyProps = {
8+ export type BottomSheetBodyProps = {
99 style ?: BottomSheetProps [ 'style' ] ;
1010 children ?: React . ReactNode ;
11+ BodyComponent ?: React . ComponentType < ComponentProps < typeof Animated . View > > ;
1112} ;
1213
13- function BottomSheetBodyComponent ( { style, children } : BottomSheetBodyProps ) {
14+ function BottomSheetBodyComponent ( {
15+ style,
16+ children,
17+ BodyComponent = Animated . View ,
18+ } : BottomSheetBodyProps ) {
1419 //#region hooks
1520 const { animatedIndex, animatedPosition } = useBottomSheetInternal ( ) ;
1621 //#endregion
@@ -34,9 +39,9 @@ function BottomSheetBodyComponent({ style, children }: BottomSheetBodyProps) {
3439 //#endregion
3540
3641 return (
37- < Animated . View style = { containerStyle } collapsable = { true } >
42+ < BodyComponent style = { containerStyle } collapsable = { true } >
3843 { children }
39- </ Animated . View >
44+ </ BodyComponent >
4045 ) ;
4146}
4247
0 commit comments