import * as React from "react" ; import { Text , TouchableOpacity } from "react-native" ; import ExamplesRegistry from "../../Services/ExamplesRegistry" ; import styles from "./DrawerButtonStyles" ; ExamplesRegistry . addComponentExample ( "Drawer Button" , ( ) => ( < DrawerButton text = "Example left drawer button" onPress = { ( ) => window . alert ( "Your drawers are showing" ) } />)); interface Props { onPress : ( ) => void ; text : string ; } const DrawerButton = ( { text , onPress = ( ) => { } } ) => ( < TouchableOpacity onPress = { onPress } > < Text style = { styles . text } > { text } < /Text> < /TouchableOpacity>); export default DrawerButton ;