import React from 'react'; import { RectButton, RectButtonProps } from 'react-native-gesture-handler'; import { themes } from '../constants/colors'; interface ITouchProps extends RectButtonProps { children: React.ReactNode; theme: string; accessibilityLabel?: string; testID?: string; } class Touch extends React.Component { private ref: any; setNativeProps(props: ITouchProps): void { this.ref.setNativeProps(props); } getRef = (ref: RectButton): void => { this.ref = ref; }; render(): JSX.Element { const { children, onPress, theme, underlayColor, ...props } = this.props; return ( {children} ); } } export default Touch;