Is there a way to align Native Base buttons so they both appear on the same line? Currently, the second button is positioned correctly on the right, but it seems slightly lower than the first button. How can I adjust this alignment?
<View style={scaledAvailableTripsStyles.buttonView}>
<Button
rounded
style={scaledAvailableTripsStyles.button}>
<Text style={scaledAvailableTripsStyles.text}>Button 1</Text>
</Button>
<View style={scaledAvailableTripsStyles.rightButtonView}>
<Button
rounded
style={scaledAvailableTripsStyles.buttonBlack}>
<Text style={scaledAvailableTripsStyles.text}>Button 2</Text>
</Button>
</View>
</View>
Styling:
button: {
width: moderateScale(170),
height: moderateScale(40),
backgroundColor: '#31C283',
justifyContent: 'center',
},
buttonBlack: {
width: moderateScale(170),
height: moderateScale(40),
backgroundColor: '#2E3331',
justifyContent: 'center',
},
text: {
fontSize: moderateScale(14, 0.7),
},
searchField: {
width: 300,
},
buttonView: {
paddingTop: 450,
},
rightButtonView: {
paddingLeft: 200,
}
Edit: After adding flexDirection, spacing between the two buttons needs adjustment. Any suggestions for creating space between them?