add hook for mobile device check
This commit is contained in:
@@ -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`);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user