@acusti/use-bounding-client-rect
Version:
React hook that returns the boundingClientRect for an element and triggers an update when those dimensions change
24 lines (22 loc) • 467 B
Flow
/**
* Flowtype definitions for useBoundingClientRect
* Generated by Flowgen from a Typescript Definition
* Flowgen v1.21.0
* @flow
*/
declare type EmptyRect = {|
bottom: void,
left: void,
right: void,
top: void,
|};
declare type Rect = {|
bottom: number,
left: number,
right: number,
top: number,
|};
declare var useBoundingClientRect: (
element?: HTMLElement | null
) => EmptyRect | Rect;
declare export default typeof useBoundingClientRect;