Guest User

Untitled

a guest
Mar 9th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. "use strict";
  2.  
  3. import React, { AppRegistry } from 'react-native';
  4. import App from './components/App';
  5.  
  6. AppRegistry.registerComponent('ReactNativeProject', () => App);
  7.  
  8. 'use strict'
  9.  
  10. import React, {Component} from 'react';
  11. import {
  12. AppRegistry,
  13. StyleSheet,
  14. NavigatorIOS,
  15. } from 'react-native';
  16. var Login = require('./Login');
  17.  
  18. class App extends Component {
  19. render() {
  20. return (
  21. <NavigatorIOS
  22. style={styles.navigationContainer}
  23. initialRoute={{
  24. title: "Login Page",
  25. component: Login,
  26. }} />
  27. );
  28. }
  29. }
  30.  
  31. var styles = StyleSheet.create({
  32. navigationContainer: {
  33. flex: 1
  34. }
  35. });
  36.  
  37. export default App;
  38.  
  39. "use strict";
  40. import React, {Component} from 'react';
  41. import {
  42. StyleSheet,
  43. Text,
  44. TextInput
  45. } from 'react-native';
  46. import Button from 'react-native-button';
  47. import styles from './login';
  48.  
  49.  
  50. class Login extends Component {
  51.  
  52. constructor(props) {
  53. super(props);
  54. this.state = {
  55. username: "",
  56. password: "",
  57.  
  58. };
  59. }
  60.  
  61. render() {
  62. return (
  63.  
  64. <View style={styles.container}>
  65. <View style={styles.textContainer}>
  66. <TextInput
  67. style={styles.inputUsername}
  68. placeholder="Enter email ID"
  69. value={this.state.username}
  70. clearButtonMode = 'while-editing'/>
  71. <TextInput
  72. style={styles.inputPassword}
  73. placeholder="Enter Password"
  74. value={this.state.password}
  75. password={true}
  76. secureTextEntry={true}
  77. clearButtonMode = 'while-editing' />
  78.  
  79. <Button style={styles.login}
  80. styleDisabled={{color: 'red'}}>
  81. Login
  82. </Button>
  83. </View>
  84. </View>
  85. );
  86. }
  87.  
  88. module.exports = Login;
  89.  
  90. import Login from './Login';
  91.  
  92. class Login extends Component {
  93. }
  94.  
  95. class Login extends React.Component {
  96. }
Add Comment
Please, Sign In to add comment