UNPKG

@gorhom/bottom-sheet

Version:

A performant interactive bottom sheet with fully configurable options 🚀

13 lines (9 loc) • 365 B
import { useContext } from 'react'; import { BottomSheetGestureHandlersContext } from '../contexts/gesture'; export const useBottomSheetGestureHandlers = () => { const context = useContext(BottomSheetGestureHandlersContext); if (context === null) { throw "'useBottomSheetGestureHandlers' cannot be used out of the BottomSheet!"; } return context; };