This commit is contained in:
Pat Teruel
2026-01-30 16:42:46 +08:00
parent 4eee4a9859
commit f3e347472e
7 changed files with 2930 additions and 11 deletions

21
App.tsx
View File

@@ -5,12 +5,8 @@
* @format
*/
import { NewAppScreen } from '@react-native/new-app-screen';
import { StatusBar, StyleSheet, useColorScheme, View } from 'react-native';
import {
SafeAreaProvider,
useSafeAreaInsets,
} from 'react-native-safe-area-context';
import { SafeAreaProvider } from 'react-native-safe-area-context';
function App() {
const isDarkMode = useColorScheme() === 'dark';
@@ -23,15 +19,17 @@ function App() {
);
}
import React from 'react';
import MyText from './components/MyText';
function AppContent() {
const safeAreaInsets = useSafeAreaInsets();
const handlePress = React.useCallback(() => {
alert('You just pressed the text component');
}, []);
return (
<View style={styles.container}>
<NewAppScreen
templateFileName="App.tsx"
safeAreaInsets={safeAreaInsets}
/>
<MyText yournameherefromprops="Pat" onPress={handlePress} />
</View>
);
}
@@ -39,6 +37,9 @@ function AppContent() {
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff',
},
});