2018-08-31 16:46:33 +00:00
|
|
|
import React from 'react';
|
2017-12-20 15:57:33 +00:00
|
|
|
import { TouchableHighlight } from 'react-native';
|
2018-08-31 16:46:33 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2017-12-20 15:57:33 +00:00
|
|
|
|
2018-08-31 16:46:33 +00:00
|
|
|
const Touch = ({ children, onPress, ...props }) => (
|
|
|
|
<TouchableHighlight
|
|
|
|
underlayColor='#FFFFFF'
|
|
|
|
activeOpacity={0.5}
|
|
|
|
onPress={onPress}
|
|
|
|
{...props}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</TouchableHighlight>
|
|
|
|
);
|
|
|
|
|
|
|
|
Touch.propTypes = {
|
|
|
|
children: PropTypes.node.isRequired,
|
2018-09-11 16:32:52 +00:00
|
|
|
onPress: PropTypes.func
|
2018-08-31 16:46:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default Touch;
|