import React from "react"; import { Pressable, PressableProps, StyleProp, ViewStyle } from "react-native"; type Props = { style?: StyleProp; activeOpacity?: number; disabledOpacity?: number; } & PressableProps; export default function Touchable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, style, ...props }: Props) { return ( { return [ { opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1, }, style, ]; }} {...props} > {children} ); }