UNPKG
magner
Version:
latest (0.7.52)
0.7.52
0.7.51
0.7.50
0.7.49
0.7.48
0.7.47
0.7.46
0.7.45
0.7.44
0.7.43
0.7.42
0.7.41
0.7.40
0.7.39
0.7.38
0.7.37
0.7.36
0.7.35
0.7.34
0.7.33
0.7.32
0.7.31
0.7.30
0.7.29
0.7.28
0.7.27
0.7.26
0.7.25
0.7.24
0.7.23
0.7.22
0.7.21
0.7.20
0.7.19
0.7.18
0.7.12
0.7.11
0.7.10
0.7.9
0.7.8
0.7.7
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.40
0.6.39
0.6.38
0.6.37
0.6.36
0.6.35
0.6.34
0.6.33
0.6.31
0.6.30
0.6.29
0.6.28
0.6.27
0.6.26
0.6.25
0.6.24
0.6.23
0.6.22
0.6.21
0.6.20
0.6.19
0.6.18
0.6.17
0.6.16
0.6.15
0.6.14
0.6.13
0.6.12
0.6.11
0.6.10
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.20
0.5.19
0.5.18
0.5.17
0.5.16
0.5.15
0.5.14
0.5.13
0.5.12
0.5.11
0.5.10
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0
Universal admin panel magnetic to any backend
github.com/code-pilots/magner
code-pilots/magner
magner
/
lib
/
utils
/
core
/
is-mobile.ts
15 lines
(10 loc)
•
292 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import
{ ref }
from
'vue'
;
export
const
useMobile
= (
) => {
const
isMobile = ref<
boolean
>(
false
);
const
media =
matchMedia
(
'(max-width: 767px)'
); isMobile.
value
= media.
matches
; media.
addEventListener
(
'change'
,
(
e
) =>
{ isMobile.
value
= e.
matches
; });
return
isMobile; };