MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / prefersDark

Function prefersDark

packages/react/src/api/shell-host.ts:105–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103};
104
105const prefersDark = (): boolean =>
106 typeof globalThis.window !== "undefined" &&
107 typeof globalThis.window.matchMedia === "function" &&
108 globalThis.window.matchMedia("(prefers-color-scheme: dark)").matches;
109
110/**
111 * Build the host. `fetch` is injectable so the seam can be tested without a

Callers 1

createHttpShellHostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected