@mantine/hooks
Version:
A collection of 50+ hooks for state and UI management
9 lines (8 loc) • 423 B
TypeScript
type ObserverRect = Omit<DOMRectReadOnly, 'toJSON'>;
export declare function useResizeObserver<T extends HTMLElement = any>(options?: ResizeObserverOptions): readonly [import("react").RefObject<T | null>, ObserverRect];
export declare function useElementSize<T extends HTMLElement = any>(options?: ResizeObserverOptions): {
ref: import("react").RefObject<T | null>;
width: number;
height: number;
};
export {};