fui-fancyui
Version:
FancyUI Libary
13 lines (12 loc) • 475 B
JavaScript
import { useActiveBreakpoint as c } from "../useActiveBreakpoint/useActiveBreakpoint.js";
function p(s) {
const { breakpointId: a, breakPoints: t } = s, i = c(t);
if (!i) return null;
const o = Object.keys(t), e = o.findIndex((n) => n === i), r = o.findIndex((n) => n === a);
if (e === -1 || r === -1)
throw new Error("Invalid breakpoint ID provided");
return e === r ? "isEqual" : e > r ? "isBigger" : "isSmaller";
}
export {
p as useBreakpointComparison
};