import React, { ReactNode } from 'react'; import { Pressable, Platform } from 'react-native'; import styles from '../styles'; interface PressableTouchProps { rippleColor?: string; disabled?: boolean; children: ReactNode; onPress: () => void; } const PressableTouch: React.FC = props => { const { rippleColor, disabled, onPress, children } = props; return ( [ { backgroundColor: pressed && Platform.OS === 'ios' ? rippleColor : 'transparent', }, styles.rippleStyle, ]} android_ripple={{ color: rippleColor }} > {children} ); }; export default PressableTouch;