const React = require('react'); const { Component } = require('react'); const { StyleSheet, View, TouchableOpacity, Text, Alert, Platform } = require('react-native'); class CustomTextButton extends Component { constructor(props) { super(props); this.state = {}; } render() { return ( Alert.alert(this.props.title, 'Thanks for that :)')}> Press Me ); } } module.exports = CustomTextButton; const styles = StyleSheet.create({ container: { flex: 1, width: 60, flexDirection: 'column', justifyContent: 'center', }, button: { flex: 1, flexDirection: 'column', }, text: { color: 'black', } });