Files
mmm-projet/components/Theme.tsx
Rochas d09e8914e0 theme
2025-11-02 20:20:56 +01:00

17 lines
416 B
TypeScript

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;
});*/