File tree Expand file tree Collapse file tree
src/components/bottomSheetBackdrop Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const BottomSheetBackdropComponent = ({
4040 onPress,
4141 style,
4242 children,
43+ ViewComponent : AnimatedViewComponent = Animated . View ,
4344 accessible : _providedAccessible = DEFAULT_ACCESSIBLE ,
4445 accessibilityRole : _providedAccessibilityRole = DEFAULT_ACCESSIBILITY_ROLE ,
4546 accessibilityLabel : _providedAccessibilityLabel = DEFAULT_ACCESSIBILITY_LABEL ,
@@ -136,7 +137,7 @@ const BottomSheetBackdropComponent = ({
136137 //#endregion
137138
138139 const AnimatedView = (
139- < Animated . View
140+ < AnimatedViewComponent
140141 style = { containerStyle }
141142 pointerEvents = { pointerEvents }
142143 accessible = { _providedAccessible ?? undefined }
@@ -151,7 +152,7 @@ const BottomSheetBackdropComponent = ({
151152 }
152153 >
153154 { children }
154- </ Animated . View >
155+ </ AnimatedViewComponent >
155156 ) ;
156157
157158 return pressBehavior !== 'none' ? (
Original file line number Diff line number Diff line change 1- import type { ReactNode } from 'react' ;
1+ import type { ComponentType , ReactNode } from 'react' ;
22import type { ViewProps } from 'react-native' ;
3+ import type { AnimatedProps } from 'react-native-reanimated' ;
34import type {
45 BottomSheetVariables ,
56 NullableAccessibilityProps ,
@@ -55,4 +56,10 @@ export interface BottomSheetDefaultBackdropProps
5556 * Child component that will be rendered on backdrop.
5657 */
5758 children ?: ReactNode | ReactNode [ ] ;
59+
60+ /**
61+ * Optional component that will be used as a backdrop.
62+ * Default is `Reanimated.View`.
63+ */
64+ ViewComponent ?: ComponentType < AnimatedProps < ViewProps > > ;
5865}
You can’t perform that action at this time.
0 commit comments