UNPKG

@ozen-ui/kit

Version:

React component library

8 lines (7 loc) 367 B
import { __read } from "tslib"; import { useResizeObserver } from '../useResizeObserver'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export function useElementSize(options) { var _a = __read(useResizeObserver(options), 2), ref = _a[0], _b = _a[1], width = _b.width, height = _b.height; return { ref: ref, width: width, height: height }; }