-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
37 lines (21 loc) · 803 Bytes
/
App.js
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
36
37
import { SafeAreaView, View, FlatList, StyleSheet, Text, StatusBar, Dimensions } from 'react-native';
import CameraDemo from './Components/CameraDemo';
import { deviceInfo } from './Components/DeviceInfo';
import Item from './Components/Item';
export default function App() {
const renderItem = ({ item }) => <Item title={item.title} data={item.data}/>;
return (
<View style={styles.container}>
<CameraDemo></CameraDemo>
<FlatList data={deviceInfo} renderItem={renderItem} keyExtractor={item => item.id} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignSelf: 'center',
width : Dimensions.get('window').width > 768 ? '50%' : Dimensions.get('window').width,
marginTop: StatusBar.currentHeight || 0,
},
});