import { faArrowLeft } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-native-fontawesome"; import { createMaterialTopTabNavigator } from "@react-navigation/material-top-tabs"; import { useNavigation } from "@react-navigation/native"; import React, { useState } from "react"; import { Dimensions, ScrollView, StyleSheet, Text, TouchableOpacity, View, } from "react-native"; import { favorite } from "../../constants/favorites"; import ShopSinglePage from "../../pages/shop/ShopSinglePage"; // const Tabs = createMaterialTopTabNavigator(); const Tabs = createMaterialTopTabNavigator(); import Products from "./Products"; import Shop from "./Shop"; const Tab = ({ info,prod,item,productList }) => { const navigation = useNavigation(); const [tab, settab] = useState("prod"); return ( {/* */} settab("prod")} > Products {/* settab("more")} > More Info */} {tab === "prod" ? : } ); }; const styles = StyleSheet.create({ container: { // backgroundColor: "#ff3e3e", width: "100%", // height: "100%", // flex:1 }, wrapper: { // backgroundColor: "#ff3e3e", height: "100%", // width: "100%", // justifyContent: "center", marginBottom: 20, }, tab: { alignItems: "center", width: "100%", top: 0, // paddingLeft: 15, flexDirection: "row", }, tabBtn: { width: "50%", justifyContent: "center", alignItems: "center", paddingVertical: 15, borderWidth: 1, borderColor: "#e9e9e9", }, tabBtnActive: { width: "50%", justifyContent: "center", alignItems: "center", paddingVertical: 15, // borderWidth: 1, // borderColor: "#e9e9e9", borderBottomColor: "#ffaa00", borderBottomWidth: 3, }, tabTxt:{color:"#8f8f8fed"}, tabTxtActive:{ color:"#161616" }, header: { alignItems: "center", width: "100%", top: 0, paddingLeft: 15, flexDirection: "row", borderColor: "#ddd", paddingBottom: 15, borderBottomWidth: 1, }, headerText: { fontSize: 16, fontWeight: "600", marginLeft: 25, }, }); export default Tab;