import { RefObject } from 'react'; /** * Custom hook to manage the offset top state based on scroll position. * * @param {number} [defaultValue=0] - The offset value at which the state changes. * * @returns {UseScrollOffsetTopReturn} - An object containing: * - `offsetTop`: A boolean indicating whether the scroll position is past the offset. * - `elementRef`: A ref object to attach to the element to track its offset. * * @example * 1.Applies to top
* const { offsetTop } = useScrollOffsetTop(80); * * Or * * 2.Applies to element * const { offsetTop, elementRef } = useScrollOffsetTop(80); *
*/ type UseScrollOffsetTopReturn = { offsetTop: boolean; elementRef: RefObject; }; declare function useScrollOffsetTop(defaultValue?: number): UseScrollOffsetTopReturn; export { type UseScrollOffsetTopReturn, useScrollOffsetTop };