MCPcopy Create free account
hub / github.com/Web3Auth/Auth / getTheme

Function getTheme

src/core/AuthProvider.ts:37–41  ·  view source on GitHub ↗
(theme: THEME_MODE_TYPE)

Source from the content-addressed store, hash-verified

35const authServiceIframeMap: Map<string, HTMLIFrameElement> = new Map();
36
37function getTheme(theme: THEME_MODE_TYPE): string {
38 if (theme === THEME_MODES.light) return "light";
39 if (theme === THEME_MODES.dark) return "dark";
40 return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
41}
42
43export class AuthProvider {
44 public sdkUrl: string;

Callers 1

initMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected