UNPKG

react-resize-detector

Version:
11 lines (10 loc) 499 B
import { MutableRefObject } from 'react'; import { Props, ReactResizeDetectorDimensions } from './ResizeDetector'; interface returnType<RefType> extends ReactResizeDetectorDimensions { ref: MutableRefObject<null | RefType>; } interface FunctionProps<RefType> extends Props { targetRef?: MutableRefObject<null | RefType>; } declare function useResizeDetector<RefType extends Element = Element>(props?: FunctionProps<RefType>): returnType<RefType>; export default useResizeDetector;