Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import {
  3. AppRegistry,
  4. StyleSheet,
  5. Text,
  6. ScrollView,
  7. TextInput,
  8. View ,
  9. } from 'react-native';
  10.  
  11. var styles = require('./Style/customStyle');
  12.  
  13. import Button from 'react-native-button';
  14. import RadioButton from 'react-native-radio-button'
  15.  
  16. class AwesomeProject extends Component {
  17.  
  18. constructor(props){
  19. super(props)
  20.  
  21. this.state = {
  22. username: '',
  23. password: '',
  24. }
  25. }
  26.  
  27. render() {
  28. return (
  29. <ScrollView style={styles.content}>
  30. <View style={styles.content}>
  31.  
  32. <Text style={styles.welcome}>
  33. Create Account
  34. </Text>
  35.  
  36. <Text style={styles.textStyle}>
  37. Name
  38. </Text>
  39.  
  40. <TextInput
  41. style={styles.textInputStyle}
  42. placeholder="Enter Name"
  43. returnKeyLabel = {"next"}
  44. onChangeText={(text) => this.setState({text})}
  45. />
  46.  
  47. <Button style={styles.buttonStyle}>
  48. Submit
  49. </Button>
  50.  
  51. </View>
  52. </ScrollView>
  53. );
  54. }
  55. }
  56.  
  57. AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
  58.  
  59. <Button
  60. style={styles.textInputStyle}
  61. onPress={() => console.log(this.state.username)}>
  62. Submit
  63. </Button>
  64.  
  65. <TextInput
  66. style={styles.textInputStyle}
  67. placeholder="Enter Name"
  68. returnKeyLabel = {"next"}
  69. onChangeText={(text) => this.setState({text})}
  70. />
  71.  
  72. <Button
  73. onPress={() => function }>
  74.  
  75. class AwesomeProject extends Component {
  76.  
  77. constructor(props){
  78. super(props)
  79.  
  80. this.state = {
  81. username: '',
  82. password: '',
  83. }
  84. }
  85.  
  86. _handlePress() {
  87. console.log(this.state.username);
  88. console.log(this.state.password);
  89. }
  90.  
  91. render() {
  92. return (
  93. <ScrollView style={styles.content}>
  94. <View style={styles.content}>
  95.  
  96. <Text style={styles.welcome}>
  97. Create Account
  98. </Text>
  99.  
  100. <Text style={styles.textStyle}>
  101. Name
  102. </Text>
  103.  
  104. <TextInput
  105. style={styles.textInputStyle}
  106. placeholder="Enter Name"
  107. returnKeyLabel = {"next"}
  108. onChangeText={(text) => this.setState({username:text})}
  109. />
  110.  
  111. <Text style={styles.textStyle}>
  112. Name
  113. </Text>
  114.  
  115. <TextInput
  116. style={styles.textInputStyle}
  117. placeholder="Enter Name"
  118. returnKeyLabel = {"next"}
  119. onChangeText={(text) => this.setState({password:text})}
  120. />
  121.  
  122. <Button
  123. onPress={() => this._handlePress()}
  124. style={styles.buttonStyle}>
  125. Submit
  126. </Button>
  127.  
  128. </View>
  129. </ScrollView>
  130. );
  131. }
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement