-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathHJTopImageCell.js
53 lines (45 loc) · 1.19 KB
/
HJTopImageCell.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
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, {Component} from 'react';
import {
Image,
PixelRatio,
Platform,
StyleSheet,
Text,
TouchableHighlight,
TouchableNativeFeedback,
View
} from 'react-native';
//变量
var getImageSource = require('./getImageSource');
var styles = require('./HJStyles');
var HJTopImageCell = React.createClass({
render: function() {
var TouchableElement = TouchableHighlight;
return(
<View>
<TouchableElement
onPress = {this.props.onSelect}
onShowUnderlay = {this.props.onHighlight}
onHideUnderlay = {this.props.onUnhighlight}>
<View style = {styles.cell_first_row_image_back}>
<Image
source = {getImageSource(this.props.shopData, 'thumbnail')}
style = {styles.cell_first_row_image}>
<View style = {styles.cell_first_row_title_back}>
<Text style = {styles.cell_first_row_title}>
{this.props.shopData.title}
</Text>
</View>
</Image>
</View>
</TouchableElement>
</View>
);
},
});
module.exports = HJTopImageCell;