installThemeSync
megane-viewer / installThemeSync
Function: installThemeSync()
installThemeSync(
root?): () =>void
Defined in: stores/useThemeStore.ts:147
Keep <html data-theme> in step with the theme store, and the store's
"system" resolution in step with the OS preference and the host theme.
Also injects the colour tokens. Every host entry point calls this once
(directly, or through <ThemeSync />); the returned function undoes it.
Parameters
root?
HTMLElement = document.documentElement
Returns
() => void