From 1a2f47bf7cea180507b5df178601959879487645 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 12 Jul 2023 20:24:06 +0000 Subject: [PATCH] modal --- App.js | 2 +- src/Screens/Settings/index.js | 98 +++++++++++++++++++++++++++++++---- 2 files changed, 89 insertions(+), 11 deletions(-) diff --git a/App.js b/App.js index e913937..47bbd91 100644 --- a/App.js +++ b/App.js @@ -63,7 +63,7 @@ export function MyApp() { appContext.setUserIsDeveloperModeEnabled(e)} /> - setModalVisible(true)}>Test + + setModalVisible(true)}> + + + Anzeigemodus + + + {appContext.appColorScheme} + + + { - Alert.alert("Modal has been closed."); setModalVisible(!modalVisible); }} > @@ -119,16 +134,79 @@ export default function SettingsScreen() { - - System default - - - Dark - - Light + + + System default + + + + + {appContext.appColorScheme === "dark" ? ( + setModalVisible(false)}> + + Dark + + + + ) : ( + { + setModalVisible(false); + appContext.setAppColorScheme("dark"); + }} + > + + Dark + + + )} + + + + {appContext.appColorScheme === "light" ? ( + setModalVisible(false)}> + + Light + + + + ) : ( + { + setModalVisible(false); + appContext.setAppColorScheme("light"); + }} + > + + Light + + + )}