UNPKG

@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

9 lines 344 B
export 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; }; //# sourceMappingURL=getSizeWindowRem.js.map