@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
13 lines • 494 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSizeWindowRem = void 0;
const getSizeWindowRem = () => {
if (typeof window === 'undefined')
return 0;
if (typeof document === 'undefined')
return 0;
const elem = document?.querySelector('body');
return elem ? window.innerWidth / parseFloat(getComputedStyle(elem)['font-size']) : 0;
};
exports.getSizeWindowRem = getSizeWindowRem;
//# sourceMappingURL=getSizeWindowRem.js.map