I have 2 button places in a row like this:
I want to remove the space between the two buttons and have them side by side in a row like this:
How can I achieve this?
My Code:
<View
style={{
flexDirection: "row",
alignItems: "stretch",
justifyContent: "center",
marginTop: 10
}}
>
<View style={{ flex: 1 }}>
<Button title="Button 1" />
</View>
<View style={{ flex: 1 }}>
<Button title="Button 2" />
</View>
</View>
I am using import { Button } from "react-native-elements";
There is default CSS of Button(react-native-elements) already applied to it like padding and margin. you have to override that css with your one and then apply flex and flexDirection to attach both Buttons.
Try this code