MCPcopy
hub / github.com/primer/react / handleChange

Function handleChange

packages/react/src/ThemeProvider.tsx:169–172  ·  view source on GitHub ↗
(event: MediaQueryListEvent)

Source from the content-addressed store, hash-verified

167 }
168
169 function handleChange(event: MediaQueryListEvent) {
170 const isNight = event.matches
171 setSystemColorMode(matchesMediaToColorMode(isNight))
172 }
173
174 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
175 if (media) {

Callers

nothing calls this directly

Calls 1

matchesMediaToColorModeFunction · 0.85

Tested by

no test coverage detected