LoginButton.js 927 Bytes
import React, { Component } from 'react';
import {
    TouchableOpacity,
    Text,
    StyleSheet,
} from 'react-native';

export default class LoginButton extends Component {
    constructor(props) {
        super(props);
    }

    static defaultProps = {
        onPress: () => null,
    }

    render() {
        return (
            <TouchableOpacity
                style={styles.button}
                onPress={this.props.onPress}
            >
                <Text style={styles.title}>Login</Text>
            </TouchableOpacity>
        )
    }
}

const styles = StyleSheet.create({
    button: {
        alignSelf: 'center',
        padding: 10,
        backgroundColor: "#0066cc",
        width: 80,
        height: 40,
        marginTop: 10,
        borderRadius : 20

    },
    title: {
        fontSize: 15,
        color: 'white',
        textAlign: 'center',
        textAlignVertical : 'center',
    },
});