@extclp/vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
25 lines (24 loc) • 678 B
JavaScript
import { ref as a } from "vue";
import { isClient as i } from "@vexip-ui/utils";
const m = Object.freeze(["xs", "sm", "md", "lg", "xl", "xxl"]), l = a("xs");
if (i) {
let n = function() {
for (const [e, t] of s)
if (t.matches) {
l.value = e;
break;
}
};
const c = getComputedStyle(document.documentElement), r = {};
m.forEach((e) => {
const t = c.getPropertyValue(`--vxp-break-point-${e}`).trim(), o = matchMedia(`only screen and ${t}`);
o.addEventListener("change", n), r[e] = o;
});
const s = Object.entries(r).reverse();
n();
}
export {
m as breakPoints,
l as currentBreakPoint
};
//# sourceMappingURL=helper.mjs.map