Advertisement
tamsenmckerley

failed step one

Apr 22nd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. assignment 4.1.3
  2.  
  3.  
  4. import React, { Component } from 'react';
  5. import { AppRegistry, Text, View, TouchableHighlight, StyleSheet } from 'react-native';
  6. import { Constants } from 'expo';
  7.  
  8. export default class App extends Component {
  9.  
  10. render() {
  11. return (
  12. <View style={styles.container}>
  13. <Text style={styles.paragraph}>
  14. currency converter :)
  15. </Text>
  16. <Text style={styles.paragraph}>
  17. ​ ​
  18. </Text>
  19. <View style={styles.buttonContainer}>
  20. <TouchableHighlight
  21. style={styles.button}
  22. onPress={this.teamOneTouchdown}
  23. >
  24. <Text style={styles.buttonText}>
  25. euro
  26. </Text>
  27. </TouchableHighlight>
  28. <TouchableHighlight
  29. style={styles.button}
  30. onPress={this.teamOneFieldGoal}
  31. >
  32. <Text style={styles.buttonText}>
  33. pound
  34. </Text>
  35. </TouchableHighlight>
  36. </View>
  37.  
  38. <View style={styles.buttonContainer}>
  39. <TouchableHighlight
  40. style={styles.button}
  41. onPress={this.teamTwoTouchdown}
  42. >
  43. <Text style={styles.buttonText}>
  44. rupee
  45. </Text>
  46. </TouchableHighlight>
  47.  
  48. <TouchableHighlight
  49. style={styles.button}
  50. onPress={this.teamTwoFieldGoal}
  51. >
  52. <Text style={styles.buttonText}>
  53. yuan
  54. </Text>
  55. </TouchableHighlight>
  56. </View>
  57. <Text style={styles.paragraph}>
  58. ​ ​
  59. </Text>
  60. <Text style={styles.paragraph}>
  61. new amount:
  62. </Text>
  63.  
  64. </View>
  65. );
  66. }
  67. }
  68.  
  69. const styles = StyleSheet.create({
  70. container: {
  71. flex: 1,
  72. alignItems: 'center',
  73. justifyContent: 'center',
  74. backgroundColor: '#A6808C',
  75. },
  76. paragraph: {
  77. color: 'white',
  78. fontSize: 20,
  79. textAlign: 'center',
  80. fontWeight: 'bold',
  81. },
  82. buttonContainer: {
  83. flexDirection: 'row',
  84.  
  85. },
  86. button: {
  87. height: 50,
  88. width: 80,
  89. backgroundColor: '#CCB7AE',
  90. borderColor: 'white',
  91. borderWidth: 1,
  92. alignItems: 'center',
  93. justifyContent: 'center',
  94. },
  95. buttonText: {
  96. color: 'white',
  97. fontSize: 15,
  98. },
  99. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement