diff --git a/native/bottom-sheets/bottom-sheet.react.js b/native/bottom-sheets/bottom-sheet.react.js --- a/native/bottom-sheets/bottom-sheet.react.js +++ b/native/bottom-sheets/bottom-sheet.react.js @@ -9,18 +9,28 @@ type Props = { +children: React.Node, + +onClosed: () => mixed, }; function ForwardedBottomSheet( props: Props, ref: React.Ref, ): React.Node { - const { children } = props; + const { children, onClosed } = props; const styles = useStyles(unboundStyles); const snapPoints = React.useMemo(() => ['25%', '50%'], []); + const onChange = React.useCallback( + (index: number) => { + if (index === -1) { + onClosed(); + } + }, + [onClosed], + ); + return ( {children}