/* eslint react/prop-types: "off", react-native/no-inline-styles: "off" */ import React, { forwardRef } from 'react'; import { TouchableOpacity, View, Text } from 'react-native'; import { Icon } from 'react-native-elements'; import { useTheme } from '@react-navigation/native'; export const SquareButton = forwardRef((props, ref) => { const { colors } = useTheme(); let backgroundColor = props.backgroundColor ? props.backgroundColor : colors.buttonBlueBackgroundColor; let fontColor = colors.buttonTextColor; if (props.disabled === true) { backgroundColor = colors.buttonDisabledBackgroundColor; fontColor = colors.buttonDisabledTextColor; } return ( {props.icon && } {props.title && {props.title}} ); });