KeywordCell.js
1.25 KB
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
55
56
57
'use strict';
import React from 'react';
import ReactNative from 'react-native';
const {
View,
Image,
Text,
ScrollView,
TouchableOpacity,
Dimensions,
StyleSheet,
} = ReactNative;
import KeywordHeader from './KeywordHeader';
import KeywordText from './KeywordText';
export default class KeywordCell extends React.Component {
constructor(props) {
super (props);
}
render() {
let {icon, title, list, onPressAction, onPressKeyword} = this.props;
return (
<View style={styles.container}>
<KeywordHeader
icon={icon}
title={title}
onPressAction={onPressAction}
/>
<View style={styles.textContainer}>
{list.toJS().map((item, i) => {
return <KeywordText key={i} index={i} keyword={item.keyword} androiddata={item.androiddata} onPressKeyword={onPressKeyword}/>;
})}
</View>
</View>
);
}
}
let styles = StyleSheet.create({
container: {
},
textContainer: {
marginHorizontal: 26,
flexDirection: 'row',
flexWrap: 'wrap',
},
});