Advertisement
Guest User

Untitled

a guest
Apr 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { StyleSheet, Text, View, TextInput } from 'react-native';
  3.  
  4.  
  5. class SearchInput extends React.Component{
  6.  
  7.     render(){
  8.         return(
  9.             <View style={this.props.style}>
  10.                 <TextInput
  11.                 style={[{borderColor:'black'},{borderWidth:1}]}
  12.                 placeholder="nome"/>
  13.             </View>
  14.         );
  15.     }
  16. }
  17.  
  18. export default class App extends React.Component {
  19.   render() {
  20.     return (
  21.       <View style={styles.container}>
  22.         <View style={styles.main}>
  23.             <SearchInput style={styles.SearchInput}/>
  24.         </View>
  25.       </View>
  26.     );
  27.   }
  28. }
  29.  
  30. const styles = StyleSheet.create({
  31.   container: {
  32.     flex: 1,
  33.     backgroundColor: "yellow",
  34.     flexDirection: "column",
  35.     justifyContent: "flex-start",
  36.     alignItems: "stretch"
  37.   },
  38.   SearchInput:{
  39.     height: 40,
  40.     width: 300,
  41.     borderColor: 'grey',
  42.     borderRadius: 5,
  43.     borderWidth: 0.5,
  44.     alignItems: 'center',
  45.     justifyContent: 'center'
  46.   },
  47.   main:{
  48.     backgroundColor: "white",
  49.     flex: 1,
  50.     justifyContent: "center",
  51.     alignItems: "center"
  52.   }
  53.  
  54. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement