Flex Direction

  • Autor de la entrada:
  • Categoría de la entrada:React Native

import React, { Component } from ‘react’;
import { StyleSheet, Text, View, TextInput } from ‘react-native’;

export default class Tarjetas extends Component {
render(){
return (
<View style={styles.container}>
<View style={{flex: 1, flexDirection: ‘row’}}>
<View style={{width: 50, height: 50, backgroundColor: ‘powderblue’}} />
<TextInput placeholder = ‘Hola mundo’ style={{width: 90, height: 50, backgroundColor: ‘skyblue’, color: ‘black’}} />
<View style={{width: 50, height: 50, backgroundColor: ‘steelblue’}} />
</View>
</View>
);
}

}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: ‘#fff’,
alignItems: ‘center’,
justifyContent: ‘center’,
top:80
},
});