@ -3,10 +3,7 @@ import { Image } from "react-native";
import { NavigationContainer } from "@react-navigation/native" ;
import { NavigationContainer } from "@react-navigation/native" ;
import { createNativeStackNavigator } from "@react-navigation/native-stack" ;
import { createNativeStackNavigator } from "@react-navigation/native-stack" ;
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs" ;
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs" ;
import {
import { Entypo , FontAwesome } from "@expo/vector-icons" ;
Entypo ,
FontAwesome ,
} from "@expo/vector-icons" ;
import OrderDetails from "../src/screens/OrderDetails" ;
import OrderDetails from "../src/screens/OrderDetails" ;
import OrdersFollowUp from "../src/screens/OrdersFollowUp" ;
import OrdersFollowUp from "../src/screens/OrdersFollowUp" ;
import { Dimensions } from "react-native" ;
import { Dimensions } from "react-native" ;
@ -38,8 +35,11 @@ import homeActiveIcon from "./assets/home-active.png";
import videoActiveIcon from "./assets/video-active.png" ;
import videoActiveIcon from "./assets/video-active.png" ;
import videoDeactiveIcon from "./assets/video-deactive.png" ;
import videoDeactiveIcon from "./assets/video-deactive.png" ;
import bookDeactiveIcon from "./assets/book-deactive.png" ;
import bookDeactiveIcon from "./assets/book-deactive.png" ;
import bookActiveIcon from "./assets/book-active.png" ;
import testDeactiveIcon from "./assets/test-deactive.png" ;
import testDeactiveIcon from "./assets/test-deactive.png" ;
import testActiveIcon from "./assets/test-active.png" ;
import profileActiveIcon from "./assets/profile-active.png" ;
import profileDeactiveIcon from "./assets/profile-deactive.png" ;
const width = Dimensions . get ( "window" ) . width ;
const width = Dimensions . get ( "window" ) . width ;
@ -60,22 +60,27 @@ const BottomTabNavigator = () => {
tabBarLabelStyle : {
tabBarLabelStyle : {
fontSize : width / 34 ,
fontSize : width / 34 ,
fontFamily : "regular" ,
fontFamily : "regular" ,
transform : [ { translateY : - 7 } ]
transform : [ { translateY : - 7 } ] ,
} ,
} ,
tabBarShowLabel : true ,
tabBarShowLabel : true ,
// tabBarLabel : 'reza'
// tabBarLabel : 'reza'
} }
} }
>
>
< Tab . Screen
< Tab . Screen
name = "ShoppingCartTab "
name = "Profile "
component = { ShoppingCart }
component = { Profile }
options = { {
options = { {
title : 'سبد خرید' ,
title : "پروفایل" ,
tabBarIcon : ( { focused , color } ) => (
tabBarIcon : ( { focused , color } ) =>
< FontAwesome
focused ? (
name = "shopping-cart"
< Image
size = { 32 }
source = { profileActiveIcon }
color = { color }
style = { { width : 33 , height : 32 } }
/ >
) : (
< Image
source = { profileDeactiveIcon }
style = { { width : 33 , height : 32 } }
/ >
/ >
) ,
) ,
} }
} }
@ -84,13 +89,14 @@ const BottomTabNavigator = () => {
name = "Tests"
name = "Tests"
component = { Tests }
component = { Tests }
options = { {
options = { {
title : 'آزمون' ,
title : "آزمون" ,
tabBarIcon : ( { focused , color } ) => ( focused ?
tabBarIcon : ( { focused , color } ) =>
< FontAwesome
focused ? (
name = "map"
< Image
size = { 27 }
source = { testActiveIcon }
color = { color }
style = { { width : 33 , height : 32 } }
/ > :
/ >
) : (
< Image
< Image
source = { testDeactiveIcon }
source = { testDeactiveIcon }
style = { { width : 33 , height : 32 } }
style = { { width : 33 , height : 32 } }
@ -123,9 +129,14 @@ const BottomTabNavigator = () => {
name = "ProductsTab"
name = "ProductsTab"
component = { ProductsStackScreen }
component = { ProductsStackScreen }
options = { {
options = { {
title : 'کتاب ها' ,
title : "کتاب ها" ,
tabBarIcon : ( { focused , color } ) => ( focused ?
tabBarIcon : ( { focused , color } ) =>
< Entypo name = "shop" size = { focused ? 27 : 23 } color = { color } / > :
focused ? (
< Image
source = { bookActiveIcon }
style = { { width : 35 , height : 34 } }
/ >
) : (
< Image
< Image
source = { bookDeactiveIcon }
source = { bookDeactiveIcon }
style = { { width : 35 , height : 34 } }
style = { { width : 35 , height : 34 } }