//@flow import React, { Component, PropTypes, } from "react"; import { Text, TouchableOpacity, StyleSheet, } from "react-native"; const styles = StyleSheet.create({ root: { margin: 3, paddingVertical: 4, paddingHorizontal: 8, color: "#36f", borderWidth: 1, borderColor: "#36f", fontSize: 12, } }); export default class Btn extends Component { static propTypes = { onPress: PropTypes.func.isRequired, label: PropTypes.string.isRequired, }; render () { const { onPress, label } = this.props; return ( {label} ); } }