| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import * as React from 'react'
- import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
- import HomeScreen from '../screens/Home/HomeScreen'
- import LinksScreen from '../screens/Home/LinksScreen'
- import Icon from '../components/SvgIcon'
- import Text from '../components/Text'
- const BottomTab = createBottomTabNavigator()
- export default function BottomTabNavigator() {
- return (
- <BottomTab.Navigator initialRouteName="Home">
- <BottomTab.Screen
- name="Home"
- component={HomeScreen}
- options={{
- title: ({ focused }) => (
- <Text size="c2" bold type={focused ? 'primary' : 'info'}>
- 外卖
- </Text>
- ),
- tabBarIcon: ({ focused }) => (
- <Icon type={focused ? 'primary' : 'info'} name="home" />
- ),
- }}
- />
- <BottomTab.Screen
- name="Links"
- component={LinksScreen}
- options={{
- title: ({ focused }) => (
- <Text size="c2" bold type={focused ? 'primary' : 'info'}>
- 订单
- </Text>
- ),
- tabBarIcon: ({ focused }) => (
- <Icon type={focused ? 'primary' : 'info'} name="order" />
- ),
- }}
- />
- <BottomTab.Screen
- name="User"
- component={LinksScreen}
- options={{
- title: ({ focused }) => (
- <Text size="c2" bold type={focused ? 'primary' : 'info'}>
- 我的
- </Text>
- ),
- tabBarIcon: ({ focused }) => (
- <Icon type={focused ? 'primary' : 'info'} name="user" />
- ),
- }}
- />
- </BottomTab.Navigator>
- )
- }
|