@websolutespa/ask-ui 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{utils-CCM7KiiI.d.mts → lib/utils.d.mts} +1 -1
- package/dist/{utils-XdqGR1qq.mjs → lib/utils.mjs} +1 -1
- package/package.json +7 -7
- package/dist/exports/components.d.mts +0 -2248
- package/dist/exports/components.mjs +0 -4482
- package/dist/exports/hooks.d.mts +0 -4
- package/dist/exports/hooks.mjs +0 -2
- package/dist/exports/lib.d.mts +0 -2
- package/dist/exports/lib.mjs +0 -2
- package/dist/use-mobile-SSHtEcOs.mjs +0 -18
package/dist/exports/hooks.d.mts
DELETED
package/dist/exports/hooks.mjs
DELETED
package/dist/exports/lib.d.mts
DELETED
package/dist/exports/lib.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
//#region src/hooks/use-mobile.ts
|
|
3
|
-
const MOBILE_BREAKPOINT = 768;
|
|
4
|
-
function useIsMobile() {
|
|
5
|
-
const [isMobile, setIsMobile] = React.useState(void 0);
|
|
6
|
-
React.useEffect(() => {
|
|
7
|
-
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
8
|
-
const onChange = () => {
|
|
9
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
10
|
-
};
|
|
11
|
-
mql.addEventListener("change", onChange);
|
|
12
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
13
|
-
return () => mql.removeEventListener("change", onChange);
|
|
14
|
-
}, []);
|
|
15
|
-
return !!isMobile;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { useIsMobile as t };
|