react-use
Version:
Collection of React Hooks
4 lines (3 loc) • 307 B
TypeScript
export declare type ContentRect = Pick<DOMRectReadOnly, 'x' | 'y' | 'top' | 'left' | 'right' | 'bottom' | 'height' | 'width'>;
declare const useMeasure: <T>() => [(instance: T) => void, Pick<DOMRectReadOnly, "left" | "right" | "top" | "bottom" | "x" | "y" | "width" | "height">];
export default useMeasure;