Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/formatCodePrettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0

# Runs a single command using the runners shell
- name: Run a one-line script
Expand Down
50 changes: 35 additions & 15 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import React from 'react';
import type {Node} from 'react';
import {
SafeAreaView,
ScrollView,
Expand All @@ -26,18 +25,15 @@ import {
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';

const Section = ({children, title}): Node => {
const Section = ({children, title}) => {
const isDarkMode = useColorScheme() === 'dark';
return (
<View style={styles.sectionContainer}>
<Text
style={[
styles.sectionTitle,
{
color: isDarkMode ?
Colors.white :

Colors.black,
color: isDarkMode ? Colors.white : Colors.black,
},
]}>
{title}
Expand All @@ -51,20 +47,40 @@ const Section = ({children, title}): Node => {
]}>
{children}
</Text>
<Text
style={[
styles.sectionDescription,
{
color: isDarkMode ? Colors.light : Colors.dark,
},
]}>
{children}
</Text>
<Text
style={[
styles.sectionDescription,
{
color: isDarkMode ?
Colors.light :
Colors.dark,
},
]}>
{children}
</Text>
</View>
);
};

const App: () => Node = () => {
const isDarkMode = useColorScheme() === 'dark';
const App = () => {
const isDarkMode = useColorScheme() === "dark";

const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};

return (
<SafeAreaView style={backgroundStyle}>
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<StatusBar barStyle={isDarkMode ? "light-content" : "dark-content"} />
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
Expand All @@ -80,12 +96,16 @@ const App: () => Node = () => {
<Section title="See Your Changes">
<ReloadInstructions />
</Section>
<Section title="Debug">
<DebugInstructions />
</Section>
<Section title="Learn More" test="ok">
Read the docs to discover what to do next:
</Section>
<Section
title="Debug"
>
<DebugInstructions />
</Section>
<Section
title="Learn More"
>
Read the docs to discover what to do next:
</Section>
<LearnMoreLinks />
</View>
</ScrollView>
Expand Down