UNPKG

@appbuckets/react-ui

Version:
34 lines (33 loc) 1.05 kB
import * as React from 'react'; interface UseElementSize { /** Set if hook is disabled */ disabled?: boolean; /** Set a fixed height to use */ fixedHeight?: number; /** Set a fixed width to use */ fixedWidth?: number; /** Set the maximum height */ maximumHeight?: number; /** Set the maximum width */ maximumWidth?: number; /** Set the minimum height */ minimumHeight?: number; /** Set the minimum width */ minimumWidth?: number; /** Set if must subtract some pixel from height */ subtractToHeight?: number; /** Set if must subtract some pixel from width */ subtractToWidth?: number; /** Use height detected size without compute dimension using top position and window size */ useDetectorHeightOnly?: boolean; /** Use width detected size without compute dimension using left position and window size */ useDetectorWidthOnly?: boolean; } export declare function useElementSize(config: UseElementSize): readonly [ React.ReactElement<HTMLDivElement>, { width: number; height: number; } ]; export {};