import React from 'react'; import { StyleSheet, View } from 'react-native'; import { GestureDetector, Gesture } from 'react-native-gesture-handler'; function Box(props: { color: string; overlap?: boolean; children?: React.ReactNode; }) { const gesture = Gesture.Tap().onEnd((_e, success) => { if (success) { console.log(props.color); } }); return ( {props.children} ); } export default function Example() { return ( ); } const styles = StyleSheet.create({ home: { width: '100%', height: '100%', alignSelf: 'center', backgroundColor: 'plum', }, box: { width: 150, height: 150, }, overlap: { position: 'absolute', left: 75, top: 75, }, });