Existe uma maneira de alinhar essas caixas (linhas)
import * as React from 'react';
import { Text, View, TextInput, StyleSheet } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<View style={styles.inputContainer}>
<Text style={styles.label}>Label Text1</Text>
<TextInput
style={styles.input}
placeholder="Type here"
/>
</View>
<View style={styles.inputContainer}>
<Text style={styles.label}>Label Text2</Text>
<TextInput
style={styles.input}
placeholder="Type here"
/>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems:"center"
},
inputContainer:{
flexDirection:"row",
justifyContent:"space-between",
alignItems:"center",
marginVertical:10
},
label: {
width:"48%",
fontSize:20
},
input:{
width:"48%",
borderBottomColor:"#000",
borderBottomWidth:2,
fontSize: 20,
}
});
SAMER SAEID