mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 06:29:40 +08:00
Merge pull request #16505 from habibialkaff/master
react-navigation: Fix Tab Navigation Options
This commit is contained in:
10
types/react-navigation/index.d.ts
vendored
10
types/react-navigation/index.d.ts
vendored
@@ -584,11 +584,11 @@ export interface StackNavigatorScreenOptions {
|
||||
export interface TabNavigatorScreenOptions {
|
||||
title?: string;
|
||||
tabBarVisible?: boolean;
|
||||
tabBarIcon?: React.ReactElement<any>;
|
||||
tabBarLaben?: string
|
||||
|React.ReactElement<any>
|
||||
| ((options: {focused: boolean, tintColor: string}) => React.ReactElement<any>)
|
||||
;
|
||||
tabBarIcon?: React.ReactElement<any>
|
||||
| ((options: { focused: boolean, tintColor: string }) => React.ReactElement<any>);
|
||||
tabBarLabel?: string
|
||||
| React.ReactElement<any>
|
||||
| ((options: { focused: boolean, tintColor: string }) => React.ReactElement<any>);
|
||||
}
|
||||
|
||||
export interface DrawerNavigatorScreenOptions {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { View } from 'react-native';
|
||||
import {
|
||||
addNavigationHelpers,
|
||||
StackNavigator,
|
||||
TabNavigatorScreenOptions
|
||||
} from 'react-navigation';
|
||||
|
||||
const Start = (
|
||||
@@ -28,3 +29,10 @@ const Router = (props: any) => (
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
const tabNavigatorScreenOptions: TabNavigatorScreenOptions = {
|
||||
title: 'title',
|
||||
tabBarVisible: true,
|
||||
tabBarIcon: <View />,
|
||||
tabBarLabel: 'label'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user