import { type RefObject } from "react"; import type { VoidFn } from "../../utils/types"; export type Entries = Array; /** * Watches for size changes of an element using `ResizeObserver`. * * @remarks * This hook returns a ref to attach to the element. * The callback receives the `ResizeObserverEntry` array. * The callback can optionally return a cleanup function. * * @typeParam T - The element type. * @param cb - The callback to execute on resize. * @returns A ref object to attach to the target element. * * @example * ```tsx * const ref = useResizeObserver((entries) => { * for (const entry of entries) { * console.log(entry.contentRect); * } * }); * return
; * ``` */ export declare function useResizeObserver(cb: (e: Entries) => undefined | VoidFn): RefObject;