import 'react-native-gesture-handler';
import React from 'react';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import AntDesign from 'react-native-vector-icons/AntDesign';
import IconI from 'react-native-vector-icons/Ionicons';
import Home from '../pages/Home';
import Wallet from '../pages/Wallet';
import Pay from '../pages/Pay';
const Routes:React.FC = () => {
const Tab = createBottomTabNavigator();
const icons = {
Home: {
lib: AntDesign,
name: 'home'
},
Wallet: {
lib: AntDesign,
name: 'creditcard'
},
Pay: {
lib: AntDesign,
name: 'home'
},
Notifications: {
lib: IconI,
name:'ios-notificaions-outline'
},
Config: {
lib: AntDesign,
name: 'setting'
}
}
return (
<Tab.Navigator
screenOptions={({route}) => ({
tabBarIcon: ({color, size}) => {
const {} = icons[route.name];
}
})}
>
<Tab.Screen options={{title:'Inicio'}} name="Home" component={Home} />
<Tab.Screen options={{title:'Carteira'}} name="Wallet" component={Wallet} />
<Tab.Screen options={{title:'Pagar'}} name="Pay" component={Pay} />
<Tab.Screen options={{title:'Notificações'}} name="Notifications" component={Pay} />
<Tab.Screen options={{title:'Ajustes'}} name="Config" component={Pay} />
</Tab.Navigator>
)
}
export default Routes;
import 'react-native-gesture-handler';
import React from 'react';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import AntDesign from 'react-native-vector-icons/AntDesign';
import IconI from 'react-native-vector-icons/Ionicons';
import Home from '../pages/Home';
import Wallet from '../pages/Wallet';
import Pay from '../pages/Pay';
const Routes:React.FC = () => {
const Tab = createBottomTabNavigator();
const icons = {
Home: {
lib: AntDesign,
name: 'home'
},
Wallet: {
lib: AntDesign,
name: 'creditcard'
},
Pay: {
lib: AntDesign,
name: 'home'
},
Notifications: {
lib: IconI,
name:'ios-notificaions-outline'
},
Config: {
lib: AntDesign,
name: 'setting'
}
}
return (
<Tab.Navigator
screenOptions={({route}) => ({
tabBarIcon: ({color, size}) => {
const {} = icons[route.name];
}
})}
>
<Tab.Screen options={{title:'Inicio'}} name="Home" component={Home} />
<Tab.Screen options={{title:'Carteira'}} name="Wallet" component={Wallet} />
<Tab.Screen options={{title:'Pagar'}} name="Pay" component={Pay} />
<Tab.Screen options={{title:'Notificações'}} name="Notifications" component={Pay} />
<Tab.Screen options={{title:'Ajustes'}} name="Config" component={Pay} />
</Tab.Navigator>
)
}
export default Routes;