UNPKG

@devlander/hooks

Version:
13 lines (12 loc) 512 B
import type { LayoutChangeEvent } from "react-native"; /** * Custom hook to detect if a layout is overflowing the screen width. * * @returns {Object} - The hook returns an object containing: * - `onLayout`: A callback function to be used in the `onLayout` prop of a component. * - `isOverflowing`: A boolean indicating whether the layout is overflowing the screen width. */ export declare const useOverflowDetection: () => { onLayout: (event: LayoutChangeEvent) => void; isOverflowing: boolean; };