41 lines
913 B
TypeScript
41 lines
913 B
TypeScript
/**
|
|
* Sample React Native App
|
|
* https://github.com/facebook/react-native
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import React from 'react';
|
|
import {
|
|
SafeAreaView,
|
|
ScrollView,
|
|
StatusBar,
|
|
Text,
|
|
useColorScheme,
|
|
} from 'react-native';
|
|
import {Colors} from './src/colors';
|
|
|
|
function App(): JSX.Element {
|
|
const isDarkMode = useColorScheme() === 'dark';
|
|
|
|
const backgroundStyle = {
|
|
flex: 1,
|
|
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
|
|
};
|
|
|
|
const textStyle = {color: isDarkMode ? Colors.light : Colors.dark};
|
|
|
|
return (
|
|
<SafeAreaView style={backgroundStyle}>
|
|
<StatusBar
|
|
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
|
|
backgroundColor={backgroundStyle.backgroundColor}
|
|
/>
|
|
<ScrollView contentInsetAdjustmentBehavior="automatic">
|
|
<Text style={textStyle}>{'hello world'}</Text>
|
|
</ScrollView>
|
|
</SafeAreaView>
|
|
);
|
|
}
|
|
|
|
export default App;
|