Skip to content

Commit 17c5cea

Browse files
committed
feat: tab-navigation added, 5 screens added
1 parent 51c18b6 commit 17c5cea

18 files changed

+1194
-129
lines changed

App.tsx

Lines changed: 7 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,8 @@
1-
/**
2-
* Sample React Native App
3-
* https://github.com/facebook/react-native
4-
*
5-
* Generated with the TypeScript template
6-
* https://github.com/react-native-community/react-native-template-typescript
7-
*
8-
* @format
9-
*/
1+
import React from 'react';
2+
import {useColorScheme} from 'react-native';
103

11-
import React, {type PropsWithChildren} from 'react';
12-
import {
13-
SafeAreaView,
14-
ScrollView,
15-
StatusBar,
16-
StyleSheet,
17-
Text,
18-
useColorScheme,
19-
View,
20-
} from 'react-native';
21-
22-
import {
23-
Colors,
24-
DebugInstructions,
25-
Header,
26-
LearnMoreLinks,
27-
ReloadInstructions,
28-
} from 'react-native/Libraries/NewAppScreen';
29-
30-
const Section: React.FC<
31-
PropsWithChildren<{
32-
title: string;
33-
}>
34-
> = ({children, title}) => {
35-
const isDarkMode = useColorScheme() === 'dark';
36-
return (
37-
<View style={styles.sectionContainer}>
38-
<Text
39-
style={[
40-
styles.sectionTitle,
41-
{
42-
color: isDarkMode ? Colors.white : Colors.black,
43-
},
44-
]}>
45-
{title}
46-
</Text>
47-
<Text
48-
style={[
49-
styles.sectionDescription,
50-
{
51-
color: isDarkMode ? Colors.light : Colors.dark,
52-
},
53-
]}>
54-
{children}
55-
</Text>
56-
</View>
57-
);
58-
};
4+
import {Colors} from 'react-native/Libraries/NewAppScreen';
5+
import Navigation from './src/navigation';
596

607
const App = () => {
618
const isDarkMode = useColorScheme() === 'dark';
@@ -65,56 +12,10 @@ const App = () => {
6512
};
6613

6714
return (
68-
<SafeAreaView style={backgroundStyle}>
69-
<StatusBar
70-
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
71-
backgroundColor={backgroundStyle.backgroundColor}
72-
/>
73-
<ScrollView
74-
contentInsetAdjustmentBehavior="automatic"
75-
style={backgroundStyle}>
76-
<Header />
77-
<View
78-
style={{
79-
backgroundColor: isDarkMode ? Colors.black : Colors.white,
80-
}}>
81-
<Section title="Step One">
82-
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
83-
screen and then come back to see your edits.
84-
</Section>
85-
<Section title="See Your Changes">
86-
<ReloadInstructions />
87-
</Section>
88-
<Section title="Debug">
89-
<DebugInstructions />
90-
</Section>
91-
<Section title="Learn More">
92-
Read the docs to discover what to do next:
93-
</Section>
94-
<LearnMoreLinks />
95-
</View>
96-
</ScrollView>
97-
</SafeAreaView>
15+
<>
16+
<Navigation />
17+
</>
9818
);
9919
};
10020

101-
const styles = StyleSheet.create({
102-
sectionContainer: {
103-
marginTop: 32,
104-
paddingHorizontal: 24,
105-
},
106-
sectionTitle: {
107-
fontSize: 24,
108-
fontWeight: '600',
109-
},
110-
sectionDescription: {
111-
marginTop: 8,
112-
fontSize: 18,
113-
fontWeight: '400',
114-
},
115-
highlight: {
116-
fontWeight: '700',
117-
},
118-
});
119-
12021
export default App;

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
# React Native Typescript Starter
1+
# React Native Typescript Starter
2+
3+
## ⭐ Features
4+
5+
- React Native Typescript Template
6+
- Tab Navigation installed
7+
- 5 Tab Screen

android/app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ project.ext.react = [
8484

8585
apply from: "../../node_modules/react-native/react.gradle"
8686

87+
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
88+
8789
/**
8890
* Set this to true to create two separate APKs instead of one:
8991
* - An APK that only works on ARM devices
@@ -256,6 +258,8 @@ dependencies {
256258

257259
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
258260

261+
implementation project(':react-native-vector-icons')
262+
259263
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
260264
exclude group:'com.facebook.fbjni'
261265
}

android/settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ apply from: file("../node_modules/@react-native-community/cli-platform-android/n
33
include ':app'
44
includeBuild('../node_modules/react-native-gradle-plugin')
55

6+
include ':react-native-vector-icons'
7+
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
8+
69
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
710
include(":ReactAndroid")
811
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')

0 commit comments

Comments
 (0)