forked from suprekaka/InnovationNative
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
54 lines (50 loc) · 1.12 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import React, { Component } from 'react'
import {
View,
StyleSheet,
} from 'react-native'
import AttachmentToolbar from './components/AttachmentToolbar'
import AttachmentGrid from './components/AttachmentGrid'
const genRows = function() {
const datablob = []
for (let i = 0; i < 100; i++) {
datablob.push({
imgSource: {uri: 'https://www.baidu.com/img/bd_logo1.png'},
name: `Test name ${i}`,
size: '10',
subject: `Test subject ${i}`,
from: `Test from ${i}`
})
}
return datablob
}
class App extends Component {
constructor(props) {
super(props)
}
render() {
return (
<View style={styles.container}>
<AttachmentToolbar styles={styles.attahmentToolbar}/>
<AttachmentGrid styles={styles.attachmentGrid} data={genRows()}/>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#ccc',
},
attahmentToolbar: {
height: 60,
backgroundColor: '#ccc',
borderStyle: 'solid',
borderBottomWidth: 3,
borderBottomColor: '#000',
},
attachmentGrid: {
flex: 1,
}
})
export default App