Rocket.Chat.ReactNative/app/utils/touch/index.ios.js

23 lines
480 B
JavaScript
Raw Normal View History

import React from 'react';
import { TouchableHighlight } from 'react-native';
import PropTypes from 'prop-types';
2019-03-29 19:36:07 +00:00
import { COLOR_WHITE } from '../../constants/colors';
const Touch = ({ children, onPress, ...props }) => (
<TouchableHighlight
2019-03-29 19:36:07 +00:00
underlayColor={COLOR_WHITE}
activeOpacity={0.5}
onPress={onPress}
{...props}
>
{children}
</TouchableHighlight>
);
Touch.propTypes = {
children: PropTypes.node.isRequired,
onPress: PropTypes.func
};
export default Touch;