mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
f0f71ea914
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51934 Moves `packages/helloworld` to `private/helloworld`. Changelog: [Internal] Reviewed By: huntie Differential Revision: D76356557 fbshipit-source-id: 92b20d75a8f2badb3c685d4918fe692623d9c04d
44 lines
870 B
TypeScript
44 lines
870 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import * as React from 'react';
|
|
import {
|
|
SafeAreaView,
|
|
ScrollView,
|
|
StatusBar,
|
|
StyleSheet,
|
|
Text,
|
|
View,
|
|
useColorScheme,
|
|
} from 'react-native';
|
|
|
|
function App(): React.ReactNode {
|
|
const isDarkMode = useColorScheme() === 'dark';
|
|
|
|
return (
|
|
<SafeAreaView>
|
|
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
|
|
<ScrollView contentInsetAdjustmentBehavior="automatic">
|
|
<View>
|
|
<Text style={styles.title}>Hello, World!</Text>
|
|
</View>
|
|
</ScrollView>
|
|
</SafeAreaView>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
title: {
|
|
fontSize: 24,
|
|
fontWeight: '600',
|
|
},
|
|
});
|
|
|
|
export default App;
|