2018-08-31 16:46:33 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { TouchableNativeFeedback, View } from 'react-native';
|
|
|
|
import PropTypes from 'prop-types';
|
2017-12-20 15:57:33 +00:00
|
|
|
|
2018-08-31 16:46:33 +00:00
|
|
|
const Touch = ({
|
|
|
|
children, style, onPress, ...props
|
|
|
|
}) => (
|
|
|
|
<TouchableNativeFeedback
|
|
|
|
onPress={onPress}
|
|
|
|
{...props}
|
|
|
|
>
|
|
|
|
<View style={style}>
|
|
|
|
{children}
|
|
|
|
</View>
|
|
|
|
</TouchableNativeFeedback>
|
|
|
|
);
|
|
|
|
|
|
|
|
Touch.propTypes = {
|
|
|
|
children: PropTypes.node.isRequired,
|
|
|
|
style: PropTypes.any,
|
|
|
|
onPress: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Touch;
|