hmc-guide/themes/hugo-mod-jslibs-dist/popperjs/package/lib/utils/rectToClientRect.js.flow

13 lines
271 B
Plaintext

// @flow
import type { Rect, ClientRectObject } from '../types';
export default function rectToClientRect(rect: Rect): ClientRectObject {
return {
...rect,
left: rect.x,
top: rect.y,
right: rect.x + rect.width,
bottom: rect.y + rect.height,
};
}