"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useDimensions=void 0;const react_1=require("react");function useDimensions(e){const[t,n]=(0,react_1.useState)(null);return(0,react_1.useLayoutEffect)((()=>{if(e){const t=()=>window.requestAnimationFrame((()=>n(e.getBoundingClientRect())));return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}}),[e]),[t]}exports.useDimensions=useDimensions;
//# sourceMappingURL=useDimensions.js.map