This commit is contained in:
Rochas
2025-11-02 20:20:56 +01:00
parent 879139c9b0
commit d09e8914e0
6 changed files with 108 additions and 17 deletions

17
components/Theme.tsx Normal file
View File

@@ -0,0 +1,17 @@
import {Appearance,ColorSchemeName } from "react-native";
import {lightTheme,darkTheme} from './themeColors';
declare global {
var theme: typeof lightTheme;
}
global.theme = Appearance.getColorScheme() === "light" ? lightTheme : darkTheme;
/*Appearance.addChangeListener(({ colorScheme }) => {
if(colorScheme==="light"){
global.theme = lightTheme;
}
else global.theme = darkTheme;
});*/