Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- assignment 4.1.3
- import React, { Component } from 'react';
- import { AppRegistry, Text, View, TouchableHighlight, StyleSheet } from 'react-native';
- import { Constants } from 'expo';
- export default class App extends Component {
- render() {
- return (
- <View style={styles.container}>
- <Text style={styles.paragraph}>
- currency converter :)
- </Text>
- <Text style={styles.paragraph}>
-
- </Text>
- <View style={styles.buttonContainer}>
- <TouchableHighlight
- style={styles.button}
- onPress={this.teamOneTouchdown}
- >
- <Text style={styles.buttonText}>
- euro
- </Text>
- </TouchableHighlight>
- <TouchableHighlight
- style={styles.button}
- onPress={this.teamOneFieldGoal}
- >
- <Text style={styles.buttonText}>
- pound
- </Text>
- </TouchableHighlight>
- </View>
- <View style={styles.buttonContainer}>
- <TouchableHighlight
- style={styles.button}
- onPress={this.teamTwoTouchdown}
- >
- <Text style={styles.buttonText}>
- rupee
- </Text>
- </TouchableHighlight>
- <TouchableHighlight
- style={styles.button}
- onPress={this.teamTwoFieldGoal}
- >
- <Text style={styles.buttonText}>
- yuan
- </Text>
- </TouchableHighlight>
- </View>
- <Text style={styles.paragraph}>
-
- </Text>
- <Text style={styles.paragraph}>
- new amount:
- </Text>
- </View>
- );
- }
- }
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- alignItems: 'center',
- justifyContent: 'center',
- backgroundColor: '#A6808C',
- },
- paragraph: {
- color: 'white',
- fontSize: 20,
- textAlign: 'center',
- fontWeight: 'bold',
- },
- buttonContainer: {
- flexDirection: 'row',
- },
- button: {
- height: 50,
- width: 80,
- backgroundColor: '#CCB7AE',
- borderColor: 'white',
- borderWidth: 1,
- alignItems: 'center',
- justifyContent: 'center',
- },
- buttonText: {
- color: 'white',
- fontSize: 15,
- },
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement