UNPKG

@gorhom/bottom-sheet

Version:

A performant interactive bottom sheet with fully configurable options 🚀

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