-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
35 lines (31 loc) · 847 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React from 'react';
import { SafeAreaView, StatusBar, StyleSheet, Text, View } from 'react-native';
import DatePicker from './DatePicker';
const App = () => {
const [selectedDate, setSelectedDate] = React.useState<Date>(new Date());
return (
<>
<StatusBar barStyle="dark-content" backgroundColor={'transparent'} />
<SafeAreaView style={styles.container}>
<DatePicker onDateChange={setSelectedDate} />
<View style={styles.labelContainer}>
<Text style={styles.dateLabel}>{selectedDate.toDateString()}</Text>
</View>
</SafeAreaView>
</>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
labelContainer: {
marginTop: 10,
justifyContent: 'center',
alignItems: 'center',
},
dateLabel: {
fontSize: 16,
},
});
export default App;