-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMenuItem.js
More file actions
30 lines (27 loc) · 761 Bytes
/
MenuItem.js
File metadata and controls
30 lines (27 loc) · 761 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
import React, {Component, props} from 'react';
import {
TouchableHighlight,
View,
Text,
} from "react-native";
import {default as styles } from "./Styles.js";
export default class MenuItem extends Component {
onPressHandler = () => {
this.props.onPressFunc(this.props.name);
}
render() {
const { label } = this.props;
return (
<TouchableHighlight onPress={this.onPressHandler}>
<View style={styles.buttondtyle}>
<Text style={styles.buttonText}>{label}</Text>
</View>
</TouchableHighlight>
);
}
}
MenuItem.propTypes = {
onPressFunc: React.PropTypes.func,
label: React.PropTypes.string,
name: React.PropTypes.string,
};