Fixed dark glassmorphism theme on mobile

This commit is contained in:
Clément Le Bihan
2024-01-14 18:23:20 +01:00
parent 5f0ea41c04
commit aebf409cea

View File

@@ -30,9 +30,8 @@ const phoneLightGlassmorphism = {
900: 'rgb(248, 250, 254)', 900: 'rgb(248, 250, 254)',
1000: 'rgb(252, 254, 254)', 1000: 'rgb(252, 254, 254)',
}; };
const lightGlassmorphism =
Platform.OS === 'web' ? defaultLightGlassmorphism : phoneLightGlassmorphism; const defaultDarkGlassmorphism = {
const darkGlassmorphism = {
50: 'rgba(16,16,20,0.9)', 50: 'rgba(16,16,20,0.9)',
100: 'rgba(16,16,20,0.1)', 100: 'rgba(16,16,20,0.1)',
200: 'rgba(16,16,20,0.2)', 200: 'rgba(16,16,20,0.2)',
@@ -46,6 +45,24 @@ const darkGlassmorphism = {
1000: 'rgba(16,16,20,1)', 1000: 'rgba(16,16,20,1)',
}; };
const phoneDarkGlassmorphism = {
50: 'rgb(10, 14, 38)',
100: 'rgb(14, 18, 42)',
200: 'rgb(18, 22, 46)',
300: 'rgb(22, 26, 50)',
400: 'rgb(26, 30, 54)',
500: 'rgb(10, 20, 54)',
600: 'rgb(14, 24, 58)',
700: 'rgb(18, 28, 62)',
800: 'rgb(22, 32, 66)',
900: 'rgb(26, 36, 70)',
1000: 'rgb(30, 40, 74)',
};
const lightGlassmorphism =
Platform.OS === 'web' ? defaultLightGlassmorphism : phoneLightGlassmorphism;
const darkGlassmorphism = Platform.OS === 'web' ? defaultDarkGlassmorphism : phoneDarkGlassmorphism;
const ThemeProvider = ({ children }: { children: JSX.Element }) => { const ThemeProvider = ({ children }: { children: JSX.Element }) => {
const colorScheme = useColorScheme(); const colorScheme = useColorScheme();