// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. /* eslint-disable new-cap */ import React, {memo} from 'react'; import {TouchableOpacity, TouchableWithoutFeedback, View, StyleProp, ViewStyle} from 'react-native'; import {TouchableNativeFeedback} from 'react-native-gesture-handler'; type TouchableProps = { testID: string; children: React.ReactNode | React.ReactNode[]; underlayColor: string; type: 'native' | 'opacity' | 'none'; style?: StyleProp; [x: string]: any; } const TouchableWithFeedbackAndroid = ({testID, children, underlayColor, type = 'native', ...props}: TouchableProps) => { switch (type) { case 'native': return ( {children} ); case 'opacity': return ( {children} ); case 'none': return ( {children} ); } return null; }; export default memo(TouchableWithFeedbackAndroid);