Skip to content

Commit aef9efc

Browse files
committed
add react-native-safe-area-context
1 parent f4d0a32 commit aef9efc

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1+
import { SafeAreaProvider } from "react-native-safe-area-context";
12
import { StatusBar } from "expo-status-bar";
2-
import { StyleSheet, Text, View } from "react-native";
3+
import { StyleSheet, View } from "react-native";
4+
5+
import { LoginScreen } from "./LoginScreen";
36

47
// eslint-disable-next-line import/no-default-export
58
export default function App() {
69
return (
7-
<View style={styles.container}>
8-
<Text>Open up App.tsx to start working on your app!</Text>
10+
<SafeAreaProvider>
911
<StatusBar style="auto" />
10-
</View>
12+
<View style={styles.container}>
13+
<LoginScreen />
14+
</View>
15+
</SafeAreaProvider>
1116
);
1217
}
1318

1419
const styles = StyleSheet.create({
1520
container: {
1621
flex: 1,
17-
backgroundColor: "#fff",
18-
alignItems: "center",
19-
justifyContent: "center",
2022
},
2123
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { View, Text } from "react-native";
2+
import React from "react";
3+
4+
interface Props {}
5+
6+
export const LoginScreen = (props: Props) => {
7+
return (
8+
<View style={{ alignItems: "center", flex: 1, justifyContent: "center" }}>
9+
<Text>LoginScreen</Text>
10+
</View>
11+
);
12+
};

hackathon/ui-tier-list/template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"react": "18.1.0",
1515
"react-dom": "18.1.0",
1616
"react-native": "0.70.5",
17+
"react-native-safe-area-context": "^4.4.1",
1718
"react-native-web": "~0.18.9"
1819
},
1920
"devDependencies": {

0 commit comments

Comments
 (0)