WIP on Mantine v6

This commit is contained in:
ajnart
2023-03-03 01:13:23 +09:00
parent 5dae500ac3
commit 387f155b29
4 changed files with 17 additions and 27 deletions

View File

@@ -4,5 +4,5 @@ import { useMediaQuery } from '@mantine/hooks';
export const useScreenLargerThan = (size: MantineSize | number) => {
const { breakpoints } = useMantineTheme();
const pixelCount = typeof size === 'string' ? breakpoints[size] : size;
return useMediaQuery(`(min-width: ${pixelCount}px)`);
return useMediaQuery('(min-width: 500px)');
};