import * as React from "react" ; import { Text , TouchableOpacity , ViewStyle } from "react-native" ; import ExamplesRegistry from "../../Services/ExamplesRegistry" ; import styles from "./FullButtonStyles" ; ExamplesRegistry . addComponentExample ( "Full Button" , ( ) => ( < FullButton text = "Hey there" onPress = { ( ) => window . alert ( "Full Button Pressed!" ) } />)); interface Props { onPress ? : ( ) => void ; style ? : ViewStyle ; text ? : string ; } const FullButton = ( { text , style , onPress = ( ) => { } } ) => ( < TouchableOpacity style = { [ styles . button , style ] } onPress = { onPress } > < Text style = { styles . buttonText } > { text && text . toUpperCase ( ) } < /Text> < /TouchableOpacity>); export default FullButton ;