V99BottomTab¶
Navigation bars provide a convenient, seamless way to switch between key destinations within an app. 3-5 destinations is the recommended range.
I. Props¶
Name | Type | Default | Description |
---|---|---|---|
tabs | object[] | - |
Set array item [{ name: string, code: string, icon: string, activeIcon: string, component: ScreenComponent<TypeParamList, RouteName>, onTabPress: func, notificationNumber: number, hasWarning: bool }] |
defaultTabPress | func | - | Handle click on tab item |
II. Usage¶
Example¶
const tabs = [
{
name: 'Tổng quan',
code: 'Home',
component: EmptyScreen,
icon: 'system_home',
},
{
name: 'Giao dịch',
code: 'transaction',
component: EmptyScreen,
icon: 'system_chart',
notificationNumber: 10,
},
{
name: 'DApp',
code: 'dapp',
component: EmptyScreen,
icon: 'system_dapp',
},
{
name: 'Cài đặt',
code: 'setting',
component: EmptyScreen,
icon: 'system_setting',
hasWarning: true,
},
]
<NavigationContainer>
<V99BottomTab tabs={tabs} />
</NavigationContainer>