MCPcopy Create free account
hub / github.com/CopilotKit/OpenGenerativeUI / apply

Function apply

apps/app/src/hooks/use-theme.tsx:21–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19 if (theme === "system") {
20 const mq = window.matchMedia("(prefers-color-scheme: dark)");
21 const apply = () => {
22 root.classList.remove("light", "dark");
23 root.classList.add(mq.matches ? "dark" : "light");
24 };
25 apply();
26 mq.addEventListener("change", apply);
27 return () => mq.removeEventListener("change", apply);

Callers 1

ThemeProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected