fix touchable area

This commit is contained in:
Michele Balistreri 2024-10-10 13:18:17 +02:00
parent c582ba65a3
commit 935864ecc5
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A

View File

@ -23,13 +23,13 @@ const Button: FC<ButtonProps> = props => {
} }
return ( return (
<View style={[textContainer(), disabled ? style.disabledBtn : null]}> <TouchableOpacity key={label} disabled={disabled} onPress={onChangeFunc} style={[textContainer(), disabled ? style.disabledBtn : null]}>
<TouchableOpacity key={label} disabled={disabled} style={style.button} onPress={onChangeFunc}> <View style={style.button}>
{type == "cancel" && <Icon name="chevron-left" size={16} style={style.cancelIcon}/>} {type == "cancel" && <Icon name="chevron-left" size={16} style={style.cancelIcon}/>}
{type == "primary" && <Text style={style.primaryText}>{label}</Text>} {type == "primary" && <Text style={style.primaryText}>{label}</Text>}
{type == "secondary" && <Text style={style.secondaryText}>{label}</Text>} {type == "secondary" && <Text style={style.secondaryText}>{label}</Text>}
</TouchableOpacity>
</View> </View>
</TouchableOpacity>
)}; )};
const style = StyleSheet.create({ const style = StyleSheet.create({