MCPcopy Index your code
hub / github.com/github/docs / useBreakpoint

Function useBreakpoint

components/hooks/useBreakpoint.ts:6–9  ·  view source on GitHub ↗
(size: Size)

Source from the content-addressed store, hash-verified

4
5type Size = 'small' | 'medium' | 'large' | 'xlarge'
6export function useBreakpoint(size: Size) {
7 const { theme } = useTheme()
8 return useMediaQuery(`(max-width: ${theme?.sizes[size]})`)
9}

Callers 1

SearchFunction · 0.90

Calls 2

useMediaQueryFunction · 0.90
useThemeFunction · 0.85

Tested by

no test coverage detected