UNPKG

geoiq-frontend-ui-kit

Version:

This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.

26 lines (25 loc) 608 B
import u from "react"; import { Breakpoints as c } from "./index.es43.js"; const b = (l) => { const { children: d, breakpoints: r = c, ...e } = l; let n = 0; typeof window < "u" && (n = window?.innerWidth ?? 0); const o = u.useMemo(() => { const i = Object.keys(e); if (i.length === 0) return null; { let s = null, p = 0; return i.forEach((a) => { const t = parseInt( r[a] ); n >= t && t > p && (s = a, p = t); }), s; } }, [n, r, e]); return o ? e[o] : d; }; export { b as Responsive }; //# sourceMappingURL=index.es42.js.map