import React, { forwardRef } from 'react'; import { TouchableOpacity, View, Text, StyleProp, ViewStyle, StyleSheet } from 'react-native'; import { useTheme } from './themes'; interface SquareButtonProps { title: string; onPress?: () => void; style?: StyleProp; testID?: string; } export const SquareButton = forwardRef((props, ref) => { const { title, onPress, style, testID } = props; const { colors } = useTheme(); const hookStyles = StyleSheet.create({ text: { color: colors.buttonTextColor, }, }); const buttonView = ( {title} ); return onPress ? ( {buttonView} ) : ( {buttonView} ); }); const styles = StyleSheet.create({ contentContainer: { flexDirection: 'row', justifyContent: 'center', alignItems: 'center', }, text: { marginHorizontal: 8, fontSize: 16, }, });