react-use/lib/useSize.d.ts
2018-10-28 14:30:17 +01:00

9 lines
338 B
TypeScript

import * as React from 'react';
export declare type Element = ((state: State) => React.ReactElement<any>) | React.ReactElement<any>;
export interface State {
width: number;
height: number;
}
declare const useSize: (element: Element, { width, height }?: Partial<State>) => [React.ReactElement<any>, State];
export default useSize;