From aebf409cea56040b5ce278a76aa9670c17d33231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 14 Jan 2024 18:23:20 +0100 Subject: [PATCH] Fixed dark glassmorphism theme on mobile --- front/Theme.tsx | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/front/Theme.tsx b/front/Theme.tsx index e7c13e0..02d33e4 100644 --- a/front/Theme.tsx +++ b/front/Theme.tsx @@ -30,9 +30,8 @@ const phoneLightGlassmorphism = { 900: 'rgb(248, 250, 254)', 1000: 'rgb(252, 254, 254)', }; -const lightGlassmorphism = - Platform.OS === 'web' ? defaultLightGlassmorphism : phoneLightGlassmorphism; -const darkGlassmorphism = { + +const defaultDarkGlassmorphism = { 50: 'rgba(16,16,20,0.9)', 100: 'rgba(16,16,20,0.1)', 200: 'rgba(16,16,20,0.2)', @@ -46,6 +45,24 @@ const darkGlassmorphism = { 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 colorScheme = useColorScheme();