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, theme, textFontSize, }) { return ( onPress()} style={[ tw("rounded-sm 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, theme: state.publicApi.theme, }); export default connect(mapStateToProps)(Pressable1);