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

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

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

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

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

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