YesPlayMusic/packages/web/hooks/useBreakpoint.ts

12 lines
224 B
TypeScript
Raw Normal View History

2022-05-29 17:53:27 +08:00
import { createBreakpoint } from 'react-use'
const useBreakpoint = createBreakpoint({
2022-06-09 20:16:05 +08:00
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
2022-05-29 17:53:27 +08:00
'2xl': 1536,
}) as () => 'sm' | 'md' | 'lg' | 'xl' | '2xl'
export default useBreakpoint