22 lines
422 B
JavaScript
22 lines
422 B
JavaScript
import React from 'react';
|
|
import { TouchableHighlight } from 'react-native';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const Touch = ({ children, onPress, ...props }) => (
|
|
<TouchableHighlight
|
|
underlayColor='#FFFFFF'
|
|
activeOpacity={0.5}
|
|
onPress={onPress}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</TouchableHighlight>
|
|
);
|
|
|
|
Touch.propTypes = {
|
|
children: PropTypes.node.isRequired,
|
|
onPress: PropTypes.func
|
|
};
|
|
|
|
export default Touch;
|