text input underline react native

Solutions on MaxInterview for text input underline react native by the best coders in the world

showing results for - "text input underline react native"
Lea
09 May 2020
1import React, {Component} from 'react';
2import {StyleSheet, Text, View,TextInput,TouchableOpacity} from 'react-native';
3
4export default class App extends Component {
5  render() {
6    return (
7      <View style={styles.container}>
8        <Text style={styles.welcome}>SEDC</Text>
9      <TextInput placeholder="Acct No/User Id" style={styles.textInput} multiline={true}></TextInput>
10      <TextInput placeholder="Password" style={styles.textInput}></TextInput>
11      <TouchableOpacity style={styles.btn} onPress={this.login}><Text>Log In</Text></TouchableOpacity>
12      </View>
13    );
14  }
15
16  login=()=>{
17    alert("testing......");
18    // this.props.navigation.navigate('Second');
19}
20}
21
22const styles = StyleSheet.create({
23  container: {
24    flex: 1,
25    justifyContent: 'center',
26    alignItems: 'center',
27    backgroundColor: '#F5FCFF',
28  },
29  welcome: {
30    fontSize: 20,
31    textAlign: 'center',
32    margin: 10,
33  },
34
35  textInput: {
36    alignSelf: 'stretch',
37    padding: 10,
38    marginLeft: 50,
39    borderBottomColor:'#000',
40    margin:5,
41    marginRight:50,
42    // backgroundColor: '#000',
43},
44  btn:{
45    alignSelf: 'stretch',
46    backgroundColor: '#01c853',
47    padding: 10,
48    margin:10,
49    marginLeft: 100,
50    marginRight:100,
51    alignItems: 'center',
52}
53});
54