import React, { FunctionComponent } from "react"; import { Text, TouchableOpacity } from "react-native"; import { useTheme } from "../../hooks/theme-context"; const NblocksButton:FunctionComponent<{onPress: () => any, title: string, type?: 'primary' | 'danger', disabled?: boolean}> = ({children, onPress, title, type, disabled}) => { const {styles, colors} = useTheme(); const getBackgroundColor = () => { switch (type) { case 'primary': return colors.primaryColor; case 'danger': return colors.dangerColor; default: return colors.cancelColor; } } return ( onPress()}> {title} ) } export {NblocksButton};