MCPcopy Index your code
hub / github.com/adobe/react-spectrum / useIsMobileDevice

Function useIsMobileDevice

packages/@react-spectrum/s2/src/utils.ts:17–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15export type Scale = 'large' | 'medium';
16
17export function useIsMobileDevice(): boolean {
18 return useMediaQuery('(max-width: 640px)');
19}
20
21export function useScale(): Scale {
22 let matchesFine = useMediaQuery('not ((hover: hover) and (pointer: fine))');

Callers

nothing calls this directly

Calls 1

useMediaQueryFunction · 0.90

Tested by

no test coverage detected