const React = require('react'); const { Component } = require('react'); const { StyleSheet, View, TouchableOpacity, Text, Alert, } = require('react-native'); const Colors = require('../commons/Colors'); const { Navigation } = require('react-native-navigation'); class RoundedButton extends Component { constructor(props) { super(props); this.subscription = Navigation.events().bindComponent(this); this.state = {}; } render() { return ( Alert.alert(this.props.title, 'Thanks for that :)')}> {this.props.title} ); } } module.exports = RoundedButton; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: 'transparent', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', padding: 4 }, button: { width: 40, height: 40, borderRadius: 20, backgroundColor: Colors.primary, justifyContent: 'center', }, text: { color: 'white', alignSelf: 'center' } });