From 8e5777e96efe28040299dd53feff0876fa5c3d71 Mon Sep 17 00:00:00 2001 From: clissossi <85489499+clissossi@users.noreply.github.com> Date: Fri, 16 Sep 2022 21:55:21 +0200 Subject: [PATCH 1/2] Update App.js --- App.js | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/App.js b/App.js index 278424a..ed103ee 100644 --- a/App.js +++ b/App.js @@ -7,7 +7,6 @@ */ import React from 'react'; -import type {Node} from 'react'; import { SafeAreaView, ScrollView, @@ -26,7 +25,7 @@ import { ReloadInstructions, } from 'react-native/Libraries/NewAppScreen'; -const Section = ({children, title}): Node => { +const Section = ({children, title}) => { const isDarkMode = useColorScheme() === 'dark'; return ( @@ -34,10 +33,7 @@ const Section = ({children, title}): Node => { style={[ styles.sectionTitle, { - color: isDarkMode ? - Colors.white : - - Colors.black, + color: isDarkMode ? Colors.white : Colors.black, }, ]}> {title} @@ -51,12 +47,32 @@ const Section = ({children, title}): Node => { ]}> {children} + + {children} + + + {children} + ); }; -const App: () => Node = () => { - const isDarkMode = useColorScheme() === 'dark'; +const App = () => { + const isDarkMode = useColorScheme() === "dark"; const backgroundStyle = { backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, @@ -64,7 +80,7 @@ const App: () => Node = () => { return ( - + @@ -80,12 +96,16 @@ const App: () => Node = () => {
-
- -
-
- Read the docs to discover what to do next: -
+
+ +
+
+ Read the docs to discover what to do next: +
From 9c913b526563ab64aa82f242dd66d3b534784fc5 Mon Sep 17 00:00:00 2001 From: clissossi Date: Fri, 16 Sep 2022 19:56:04 +0000 Subject: [PATCH 2/2] Prettified Code! --- App.js | 72 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/App.js b/App.js index ed103ee..affef7c 100644 --- a/App.js +++ b/App.js @@ -6,7 +6,7 @@ * @flow strict-local */ -import React from 'react'; +import React from "react"; import { SafeAreaView, ScrollView, @@ -15,7 +15,7 @@ import { Text, useColorScheme, View, -} from 'react-native'; +} from "react-native"; import { Colors, @@ -23,10 +23,10 @@ import { Header, LearnMoreLinks, ReloadInstructions, -} from 'react-native/Libraries/NewAppScreen'; +} from "react-native/Libraries/NewAppScreen"; const Section = ({children, title}) => { - const isDarkMode = useColorScheme() === 'dark'; + const isDarkMode = useColorScheme() === "dark"; return ( { { color: isDarkMode ? Colors.white : Colors.black, }, - ]}> + ]} + > {title} { { color: isDarkMode ? Colors.light : Colors.dark, }, - ]}> + ]} + > {children} { { color: isDarkMode ? Colors.light : Colors.dark, }, - ]}> + ]} + > + {children} + + {children} - - {children} - ); }; @@ -82,30 +84,28 @@ const App = () => { + contentInsetAdjustmentBehavior='automatic' + style={backgroundStyle} + >
-
+ }} + > +
Edit App.js to change this screen and then come back to see your edits.
-
+
-
- -
-
- Read the docs to discover what to do next: -
+
+ +
+
+ Read the docs to discover what to do next: +
@@ -120,15 +120,15 @@ const styles = StyleSheet.create({ }, sectionTitle: { fontSize: 24, - fontWeight: '600', + fontWeight: "600", }, sectionDescription: { marginTop: 8, fontSize: 18, - fontWeight: '400', + fontWeight: "400", }, highlight: { - fontWeight: '700', + fontWeight: "700", }, });