import React from "react"; import { TouchableOpacity, Text, ActivityIndicator } from "react-native"; import {connect} from 'react-redux'; //style import tw from "tailwind-rn"; import fontSize from "../constants/fontSize"; function Pressable1({ title, backgroundColor, color, border, width, onPress, loading, mobile }) { return ( onPress()} style={[ tw("rounded-md py-3 flex flex-row justify-center mb-3"), { backgroundColor: backgroundColor, borderWidth: border.width, borderColor: border.color, width: width, }, ]} > {loading ? ( ) : ( {title} )} ); } const mapStateToProps = (state) => ({ mobile : state.publicApi.mobile }) export default connect(mapStateToProps)(Pressable1);