Enable React Native strict TypeScript API (#11459)
This commit is contained in:
@@ -24,7 +24,7 @@ export function useThemeName(): ThemeName {
|
||||
}
|
||||
|
||||
function getThemeName(
|
||||
colorScheme: ColorSchemeName,
|
||||
colorScheme: ColorSchemeName | null | undefined,
|
||||
colorMode: 'system' | 'light' | 'dark',
|
||||
darkTheme?: ThemeName,
|
||||
) {
|
||||
@@ -39,11 +39,8 @@ function getThemeName(
|
||||
}
|
||||
|
||||
function updateDocument(theme: ThemeName) {
|
||||
// @ts-ignore web only
|
||||
if (IS_WEB && typeof window !== 'undefined') {
|
||||
// @ts-ignore web only
|
||||
const html = window.document.documentElement
|
||||
// @ts-ignore web only
|
||||
const meta = window.document.querySelector('meta[name="theme-color"]')
|
||||
|
||||
// remove any other color mode classes
|
||||
|
||||
Reference in New Issue
Block a user