import React from 'react'; export interface OverflowDirection { horizontal: boolean; vertical: boolean; } /** * Hook to determine if an element is overflowing. * * @param elementRef Ref to the element to check for overflow. If no `ref` is provided, the hook will create one and return it. * @returns An object containing an object `{horizontal: boolean; vertical: boolean}` indicating whether the element is overflowing, and a `ref`. If `elementRef` was provided, the returned `ref` will be the same as the one provided. * * @example * export const Component: FC = () => { * const elementRef = useRef(null); * const { isOverflowing: { horizontal, vertical } } = useIsOverflowing(elementRef); * // Without passing a ref, the hook will create one and return it. * const { isOverflowing: { horizontal, vertical }, ref: elementRef } = useIsOverflowing(); * ... * return (
...
) * } * * @since 4.2.0 */ export declare const useIsOverflowing: (elementRef?: React.RefObject) => { isOverflowing: OverflowDirection; ref: React.RefObject; };