add hook for mobile device check

This commit is contained in:
hiperman
2026-02-25 01:09:05 -05:00
parent 0014659854
commit 46e00573a3
+9
View File
@@ -0,0 +1,9 @@
import { MediaQuery } from "svelte/reactivity";
const DEFAULT_MOBILE_BREAKPOINT = 768;
export class IsMobile extends MediaQuery {
constructor(breakpoint: number = DEFAULT_MOBILE_BREAKPOINT) {
super(`max-width: ${breakpoint - 1}px`);
}
}