Skip to content

Commit

Permalink
chore: migrate TesterApp to react-native-test-app
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed May 26, 2024
1 parent ebeb75b commit 189ee24
Show file tree
Hide file tree
Showing 58 changed files with 765 additions and 2,222 deletions.
21 changes: 0 additions & 21 deletions packages/TesterApp/.eslintrc.js

This file was deleted.

68 changes: 12 additions & 56 deletions packages/TesterApp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,60 +1,16 @@
# OSX
#
*.binlog
*.hprof
*.xcworkspace/
*.zip
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local

# Android/IntelliJ
#
.gradle/
.idea/
.vs/
.xcode.env
Pods/
build/
.idea
.gradle
dist/*
!dist/.gitignore
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
#
msbuild.binlog
node_modules/
npm-debug.log
yarn-error.log

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
**/Pods/
/vendor/bundle/
1 change: 0 additions & 1 deletion packages/TesterApp/.ruby-version

This file was deleted.

2 changes: 1 addition & 1 deletion packages/TesterApp/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
118 changes: 118 additions & 0 deletions packages/TesterApp/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/

import React from 'react';
import type {PropsWithChildren} from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
useColorScheme,
View,
} from 'react-native';

import {
Colors,
DebugInstructions,
Header,
LearnMoreLinks,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';

type SectionProps = PropsWithChildren<{
title: string;
}>;

function Section({children, title}: SectionProps): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
return (
<View style={styles.sectionContainer}>
<Text
style={[
styles.sectionTitle,
{
color: isDarkMode ? Colors.white : Colors.black,
},
]}>
{title}
</Text>
<Text
style={[
styles.sectionDescription,
{
color: isDarkMode ? Colors.light : Colors.dark,
},
]}>
{children}
</Text>
</View>
);
}

function App(): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';

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

return (
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<View
style={{
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}>
<Section title="Step One">
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
screen and then come back to see your edits.
</Section>
<Section title="See Your Changes">
<ReloadInstructions />
</Section>
<Section title="Debug">
<DebugInstructions />
</Section>
<Section title="Learn More">
Read the docs to discover what to do next:
</Section>
<LearnMoreLinks />
</View>
</ScrollView>
</SafeAreaView>
);
}

const styles = StyleSheet.create({
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
},
highlight: {
fontWeight: '700',
},
});

export default App;
9 changes: 0 additions & 9 deletions packages/TesterApp/Gemfile

This file was deleted.

101 changes: 0 additions & 101 deletions packages/TesterApp/Gemfile.lock

This file was deleted.

Loading

0 comments on commit 189ee24

Please sign in to comment.