您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

11 行
274 B

  1. import { Breakpoint, useMediaQuery, useTheme } from "@mui/material";
  2. const useIsMobile = (breakpoint: Breakpoint = "sm") => {
  3. const theme = useTheme();
  4. const matches = useMediaQuery(theme.breakpoints.up(breakpoint));
  5. return !matches;
  6. };
  7. export default useIsMobile;