mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-21 16:25:36 +02:00
working on the frontend
This commit is contained in:
9
web/src/lib/hooks/is-mobile.svelte.ts
Normal file
9
web/src/lib/hooks/is-mobile.svelte.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import {MediaQuery} from "svelte/reactivity";
|
||||
|
||||
const MOBILE_BREAKPOINT = 768;
|
||||
|
||||
export class IsMobile extends MediaQuery {
|
||||
constructor() {
|
||||
super(`max-width: ${MOBILE_BREAKPOINT - 1}px`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user