forked from battle0450/Final_Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpanel2_5.js
More file actions
42 lines (37 loc) · 766 Bytes
/
panel2_5.js
File metadata and controls
42 lines (37 loc) · 766 Bytes
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
import React, { Component, PropTypes } from 'react';
import {
View,
StyleSheet,
Text,
Image,
TouchableOpacity,
} from 'react-native';
export default class ListItem extends Component {
static propTypes = {
title: PropTypes.string,
}
static defaultProps = {
title: '桌號',
onPress: () => {},
}
constructor(props) {
super(props);
}
render() {
return (
<TouchableOpacity style={styles.container} onPress={this.props.onPress}>
<Text>
{this.props.title}
</Text>
</TouchableOpacity>
);
}
}
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
height: 100,
padding: 10,
backgroundColor: '#eee',
},
})