UNPKG

@ekosh02/react-native-animated-header-scroll-view

Version:

Lightweight React Native ScrollView with animated header. No reanimated or gesture-handler required.

8 lines (5 loc) 252 B
import { useSafeAreaInsets } from 'react-native-safe-area-context' const useOptionalSafeAreaInsets = (enabled: boolean) => { return enabled ? useSafeAreaInsets() : { top: 0, bottom: 0, left: 0, right: 0 } } export default useOptionalSafeAreaInsets