I have a screen that loads as a modal with a transparent background (I made the BG for the sake of discussion).
I would like taps on the yellow part of the screen to be captured and call navigation.goBack() but it seems as though these taps are not being registered? are events not passed to the card overlay? How can I accomplish this behaviour?
This is what the code looks like for this screen:
<LoggedInStack.Screen
name={ADD_LINK_SCREEN}
component={AddLinkScreen}
options={({ navigation }) => ({
headerShown: false,
cardStyle: { backgroundColor: 'transparent' },
cardOverlay: () => (
<UNPressable
style={{ backgroundColor: 'yellow', opacity: 0.5, flex: 1 }}
onPress={() => {
console.log('pressedCardOverlay');
navigation.goBack();
}}>
</UNPressable>
),
cardOverlayEnabled: true,
cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS,
})}
/>
