Advertisement
Guest User

Untitled

a guest
Jun 9th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import {
  3. AppRegistry,
  4. StyleSheet,
  5. Text,
  6. View
  7. } from 'react-native';
  8.  
  9. import { Container, Content, Button , Form, Item, Input,Label, Icon} from 'native-base';
  10.  
  11.  
  12. export default class LoginScreen extends Component {
  13.  
  14. constructor(props){
  15. super(props)
  16. this.state = {
  17. count: 0,
  18. username: '',
  19. password: '',
  20. u_url: '',
  21.  
  22. };
  23.  
  24. }
  25. const LoginScreen = (props) => {
  26. const { navigate } = props.navigation;
  27. render() {
  28.  
  29. return (
  30. <Container style={{padding: 13}}>
  31. <Content>
  32. <Form>
  33.  
  34. <Item floatingLabel>
  35. <Icon active name='ios-contact-outline'/>
  36. <Label> UserName</Label>
  37. <Input onChangeText={(username) => this.setState({username})}
  38. />
  39. </Item>
  40. <Item floatingLabel>
  41. <Icon active name='ios-lock-outline' />
  42. <Label> PassWord</Label>
  43. <Input onChangeText={(password) => this.setState({password})} />
  44. </Item>
  45. <Item floatingLabel>
  46. <Icon active name='ios-link' />
  47. <Label> URL (Vtiger)</Label>
  48. <Input onChangeText={(u_url) => this.setState({u_url})} />
  49. </Item>
  50. </Form>
  51. <Text>{"\n"}{"\n"}</Text>
  52.  
  53. <Button block info onPress={() => navigate('App')} ><Text style={{fontSize: 23}}> Log In </Text></Button>
  54.  
  55.  
  56.  
  57. </Content>
  58. </Container>
  59. );
  60. }
  61. }
  62.  
  63. const styles = StyleSheet.create({
  64. container: {
  65. flex: 1,
  66. justifyContent: 'center',
  67. alignItems: 'center',
  68. backgroundColor: '#F5FCFF',
  69. },
  70. centerBTN: {
  71. flex:1,
  72. flexDirection:'row',
  73. alignItems:'center',
  74. justifyContent:'center'
  75. },
  76. welcome: {
  77. fontSize: 20,
  78. textAlign: 'center',
  79. margin: 10,
  80. },
  81. instructions: {
  82. textAlign: 'center',
  83. color: '#333333',
  84. marginBottom: 5,
  85. },
  86. });
  87.  
  88. LoginScreen.navigationOptions = {
  89. title: 'Login Screen',
  90. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement