Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. import React from 'react';
  2. import { StyleSheet, Text, View, TextInput, Image, Button } from 'react-native';
  3. export default class signup extends React.Component {
  4. render() {
  5. return (
  6. <View style={styles.container}>
  7. <View style={styles.vHeader}>
  8. <Text style={styles.txtHeader}> "Profile Saya"</Text>
  9. </View>
  10.  
  11. <Image
  12. style={styles.gambar}
  13. source={require("./fotoku.jpg")}
  14. resizeMode="contain"
  15. />
  16. <View style={styles.vInput}>
  17. <View style={styles.itemInput}>
  18. <Text>Nama</Text>
  19. <TextInput
  20. style={styles.txtInput}
  21. keyboardType='default'
  22. onChangeText ={
  23. (txtNama) => this.setState({Nama:txtNama})
  24. }
  25. />
  26. </View>
  27. <View style={styles.itemInput2}>
  28. <Text>TTL</Text>
  29. <TextInput
  30. style={styles.txtInput}
  31. keyboardType='default'
  32. onChangeText ={
  33. (txtTTL) => this.setState({TTL:txtTTL})
  34. }
  35. />
  36. </View>
  37. <View style={styles.itemInput}>
  38. <Text>Alamat</Text>
  39. <TextInput
  40. style={styles.txtInput}
  41. keyboardType='default'
  42. onChangeText ={
  43. (txtAlamat) => this.setState({Alamat:txtAlamat})
  44. }
  45. />
  46. </View>
  47. <View style={styles.itemInput3}>
  48. <Text>Telepon</Text>
  49. <TextInput
  50. style={styles.txtInput3}
  51. keyboardType='default'
  52. onChangeText ={
  53. (txtTelepon) => this.setState({Telepon:txtTelepon})
  54. }
  55. />
  56. </View>
  57. </View>
  58.  
  59. <View style={styles.vButton}>
  60. <Button
  61. color="orange"
  62. onPress={() => this.props.navigation.navigate('Menu')}
  63. title="Kembali"
  64. accessibilityLabel="Kembali"
  65. />
  66. </View>
  67. </View>
  68. );
  69. }
  70. }
  71. const styles = StyleSheet.create({
  72. container: {
  73. backgroundColor: '#008B8B',
  74. flex: 1
  75. },
  76. vHeader: {
  77. alignItems:'center',
  78. justifyContent:'center',
  79. marginTop:20,
  80. marginBottom:40,
  81. },
  82. txtHeader: {
  83. fontSize:30,
  84. color:'black'
  85. },
  86. vInput:{
  87. flex:2,
  88.  
  89. },
  90. itemInput :{
  91. flexDirection:'row',
  92. marginTop:10,
  93. marginLeft:45
  94. },
  95. itemInput2 :{
  96. flexDirection:'row',
  97. marginTop:10,
  98. marginLeft:60
  99. },
  100. itemInput3 :{
  101. flexDirection:'row',
  102. marginTop:10,
  103. marginLeft:40,
  104. marginBottom:20,
  105. },
  106. txtInput:{
  107. width:200,
  108. height:30,
  109. borderWidth:1,
  110. marginLeft:30,
  111. backgroundColor:'white'
  112.  
  113. },
  114. txtInput3:{
  115. width:200,
  116. height:30,
  117. backgroundColor:'white',
  118. borderWidth:1,
  119. marginLeft:30,
  120. marginBottom:20,
  121. },
  122. vButton: {
  123. width:200,
  124. height:40,
  125. marginTop:150,
  126. marginBottom:100,
  127. marginLeft:80,
  128. marginRight:100,
  129. },
  130. gambar: {
  131. height:170,
  132. width:150,
  133. marginBottom:20,
  134. marginLeft:120,
  135. marginRight:100,
  136. },
  137. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement