DefaultNotificationBody.js would be better if the changes are done
pencilcheck opened this issue · comments
Penn Su commented
- onPress is not at the outmost layer that overwrites onClose
- Could be more clear that onClose is a predefined function, not a default value that you can pass into the custom component props.
<TouchableHighlight
style={defaultStyles.root}
activeOpacity={0.3}
underlayColor="transparent"
>
<View style={[defaultStyles.container, { paddingBottom: title && message ? 10 : 0 }]}>
<TouchableHighlight
style={defaultStyles.root}
activeOpacity={0.3}
underlayColor="transparent"
onPress={() => {
onPress()
onClose()
}}
>
<View>
{title ? <Text style={[defaultStyles.text, defaultStyles.bold]}>{title}</Text> : null}
{message ? <Text style={defaultStyles.text}>{message}</Text> : null}
</View>
</TouchableHighlight>
<View>
<TouchableHighlight activeOpacity={0.3} underlayColor="transparent" onPress={onClose}>
<Text>Close</Text>
</TouchableHighlight>
</View>
</View>
</TouchableHighlight>
Rob Calcroft commented
@pencilcheck hey thanks for submitting this. If you want to open a pull request with these changes I'll happily take a look at them 😄
Rob Calcroft commented
@pencilcheck take a look at #4 and see if those changes fix some of the issues you were having
Penn Su commented
Thanks for mentioning me, however right now I don't have time to look and we are planning to going back and use this again at until some later timeline. Appreciated it though!
Rob Calcroft commented
I'm closing this as there's been no activity. Please re-open if you'd like to discuss more 😄