UNPKG

@material-ui/popper.js

Version:

A fork of popper.js to avoid the deprecation warnings: https://github.com/mui-org/material-ui/issues/19358.

15 lines (14 loc) 363 B
/** * Given element offsets, generate an output similar to getBoundingClientRect * @method * @memberof Popper.Utils * @argument {Object} offsets * @returns {Object} ClientRect like output */ export default function getClientRect(offsets) { return { ...offsets, right: offsets.left + offsets.width, bottom: offsets.top + offsets.height, }; }