mirror of
https://github.com/ente-io/ente.git
synced 2025-05-24 12:09:17 +00:00
11 lines
378 B
TypeScript
11 lines
378 B
TypeScript
import { useMediaQuery, useTheme } from "@mui/material";
|
|
|
|
/**
|
|
* Return true if the screen width is classified as a "mobile" size.
|
|
*
|
|
* We use the MUI "sm" (small, 600px) breakpoint as the cutoff. This hook will
|
|
* return true if the size of the window's width is less than 600px.
|
|
*/
|
|
export const useIsMobileWidth = () =>
|
|
useMediaQuery(useTheme().breakpoints.down("sm"));
|