Advertisement
Guest User

Untitled

a guest
Mar 12th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. import React from "react";
  2. import { View, Text, Image, TextInput, StyleSheet } from "react-native";
  3. import { Button } from "native-base";
  4. import { SocialIcon } from "react-native-elements";
  5. const logo = require("../../images/BlueLogo.jpg");
  6.  
  7. export default class LoginView extends React.Component {
  8. constructor() {
  9. super();
  10. // this.handleTextChange = this.handleTextChange.bind(this);
  11. this.state = { username: "", password: "" };
  12. }
  13.  
  14. render() {
  15. const { username, password } = this.state;
  16. return (
  17. <View style={{ flex: 1 }}>
  18. <Image source={logo} />
  19. <View>
  20. {/* <TextInput
  21. value={username}
  22. placeholder="Username"
  23. onChangeText={text => this.setState({ username: text })}
  24. style={styles.inputs}
  25. />
  26. <TextInput
  27. value={password}
  28. placeholder="Password"
  29. onChangeText={text => this.setState({ password: text })}
  30. secureTextEntry
  31. style={styles.inputs}
  32. /> */}
  33. </View>
  34. <Text style={{ textAlign: "right" }}>Forgot password</Text>
  35. <View style={{ marginLeft: 65, marginTop: 10 }}>
  36. <Button
  37. large
  38. blue
  39. center
  40. rounded
  41. onPress={() => alert(username, password)}
  42. >
  43. <Text style={{ color: "white", marginHorizontal: 50 }}>Login</Text>
  44. </Button>
  45. </View>
  46. <Text style={{ textAlign: "center", marginTop: 15 }}>Or</Text>
  47. <View style={styles.socialButtons}>
  48. <SocialIcon type="facebook" />
  49. <SocialIcon type="google-plus-official" />
  50. </View>
  51. <View style={{ flexDirection: "row", marginTop: 15 }}>
  52. <Text>Don't have an account?</Text>
  53. <Text style={{ color: "blue" }}> {" "}Sign Up</Text>
  54. </View>
  55.  
  56. </View>
  57. );
  58. }
  59. }
  60.  
  61. const styles = StyleSheet.create({
  62. inputs: {
  63. height: 50,
  64. width: 300,
  65. borderWidth: 1,
  66. borderColor: "grey",
  67. paddingRight: 10,
  68. textAlign: "left",
  69. marginTop: 5
  70. },
  71. button: {
  72. backgroundColor: "#005074"
  73. },
  74. socialButtons: {
  75. flexDirection: "row",
  76. justifyContent: "space-between",
  77. marginHorizontal: 50
  78. }
  79. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement