Skip to content

Commit 6d6f8fc

Browse files
committed
Add Back Button
1 parent 0418e2a commit 6d6f8fc

File tree

2 files changed

+41
-6
lines changed

2 files changed

+41
-6
lines changed

src/components/BackButton.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from "react";
2+
import { Text, View, Image} from "react-native";
3+
4+
export default function BackButton() {
5+
return (
6+
<View style={{flexDirection: "row", alignItems: "center"}}>
7+
<Text>{"\n\n\n"}</Text>
8+
<Image source={require("./../assets/caret-left.png")} />
9+
<Text style={{fontWeight: "bold", fontSize: 25}}>Back</Text>
10+
</View>
11+
);
12+
}

src/screens/SignInScreen.js

+29-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import React, {useState} from "react";
22
import { StatusBar } from "expo-status-bar";
3-
import { StyleSheet, Text, View, SafeAreaView, Linking, Pressable } from "react-native";
3+
import { StyleSheet, Text, View, SafeAreaView, Linking, Pressable, Image} from "react-native";
4+
5+
import BackButton from "../components/BackButton";
46

57
export default function SignInScreen() {
68
return (
7-
<SafeAreaView>
9+
<SafeAreaView style={styles.container}>
810
<Pressable>
9-
<Image source={require("./src/assets/back.png")} />
11+
<BackButton />
1012
</Pressable>
11-
<View style={styles.container}>
13+
<View style={styles.body}>
1214
<Text style={styles.title}>Sign in</Text>
15+
<Text style={styles.paragraph}>
16+
{}
17+
</Text>
1318
</View>
1419
</SafeAreaView>
1520
);
@@ -18,12 +23,30 @@ export default function SignInScreen() {
1823
const styles = StyleSheet.create({
1924
container: {
2025
backgroundColor: "#fff",
26+
padding: "1%"
27+
},
28+
29+
back: {
30+
flexDirection: "row",
31+
alignItems: "center",
32+
},
33+
34+
backText: {
35+
fontWeight: "bold",
36+
fontSize: 25,
37+
},
38+
39+
body: {
2140
alignItems: "center",
2241
justifyContent: "center",
2342
},
2443

2544
title: {
2645
fontWeight: "bold",
27-
fontSize: 24,
28-
}
46+
fontSize: 45,
47+
},
48+
49+
paragraph: {
50+
fontSize: 30,
51+
},
2952
});

0 commit comments

Comments
 (0)