import * as colors from './styles/colors'; import { styles } from './styles'; import { useEffect, useState } from 'react'; const isClient = true; export function useWindowSize(initialWidth?: any, initialHeight?: any) { if (initialWidth === void 0) { initialWidth = Infinity; } if (initialHeight === void 0) { initialHeight = Infinity; } var _a = useState({ width: isClient ? window.innerWidth : initialWidth, height: isClient ? window.innerHeight : initialHeight, }), state = _a[0], setState = _a[1]; useEffect(function() { if (isClient) { var handler_1 = function() { setState({ width: window.innerWidth, height: window.innerHeight, }); }; window.addEventListener('resize', handler_1); return function() { return window.removeEventListener('resize', handler_1); }; } else { return undefined; } }, []); return state; } export const config = { colors, styles, };