mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 22:47:02 +08:00
remove old exports and add export for SceneView and SwitchRouter (#5872)
* remove old exports and add export for SceneView and SwitchRouter * Update CHANGELOG.md * add type arg to NavigationScreenProp
This commit is contained in:
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
## Fixes
|
||||
|
||||
- Update typescript - `TabBarTop` is now `MaterialTopTabBar`
|
||||
- Update typescript - Remove `SwitchNavigator`, `TabNavigator` and `StackNavigator`. Added exports for `SceneView` and `SwitchRouter`
|
||||
- Update typescript - `getLabel` is now `getLabelText` in BottomTabProps and TopTabProps
|
||||
|
||||
## [3.9.0] - [2019-04-23](https://github.com/react-navigation/react-navigation/releases/tag/3.9.0)
|
||||
|
||||
@@ -440,6 +440,8 @@ declare module 'react-navigation' {
|
||||
* Switch Navigator
|
||||
*/
|
||||
|
||||
export interface SwitchRouter extends NavigationRouter {}
|
||||
|
||||
export interface NavigationSwitchRouterConfig {
|
||||
initialRouteName?: string;
|
||||
initialRouteParams?: NavigationParams;
|
||||
@@ -932,12 +934,6 @@ declare module 'react-navigation' {
|
||||
containerOptions?: any;
|
||||
}
|
||||
|
||||
// Return createNavigationContainer
|
||||
export function StackNavigator(
|
||||
routeConfigMap: NavigationRouteConfigMap,
|
||||
stackConfig?: StackNavigatorConfig
|
||||
): NavigationContainer;
|
||||
|
||||
export function createStackNavigator(
|
||||
routeConfigMap: NavigationRouteConfigMap,
|
||||
stackConfig?: StackNavigatorConfig
|
||||
@@ -953,11 +949,6 @@ declare module 'react-navigation' {
|
||||
// Return createNavigationContainer
|
||||
export type _SwitchNavigatorConfig = NavigationSwitchRouterConfig;
|
||||
|
||||
export function SwitchNavigator(
|
||||
routeConfigMap: NavigationRouteConfigMap,
|
||||
switchConfig?: SwitchNavigatorConfig
|
||||
): NavigationContainer;
|
||||
|
||||
export function createSwitchNavigator(
|
||||
routeConfigMap: NavigationRouteConfigMap,
|
||||
switchConfig?: SwitchNavigatorConfig
|
||||
@@ -1089,12 +1080,6 @@ declare module 'react-navigation' {
|
||||
initialLayout?: InitialLayout;
|
||||
}
|
||||
|
||||
// From navigators/TabNavigator.js
|
||||
export function TabNavigator(
|
||||
routeConfigMap: NavigationRouteConfigMap,
|
||||
drawConfig?: TabNavigatorConfig
|
||||
): NavigationContainer;
|
||||
|
||||
export function createBottomTabNavigator(
|
||||
routeConfigMap: NavigationRouteConfigMap,
|
||||
drawConfig?: BottomTabNavigatorConfig
|
||||
@@ -1474,4 +1459,16 @@ declare module 'react-navigation' {
|
||||
export const NavigationContext: React.Context<NavigationScreenProp<NavigationRoute>>;
|
||||
export const StackGestureContext: React.Context<React.Ref<PanGestureHandler>>;
|
||||
export const DrawerGestureContext: React.Context<React.Ref<PanGestureHandler>>;
|
||||
|
||||
/**
|
||||
* SceneView
|
||||
*/
|
||||
|
||||
export interface SceneViewProps {
|
||||
component: React.ComponentType;
|
||||
screenProps: ScreenProps;
|
||||
navigation: NavigationScreenProp<NavigationRoute>;
|
||||
}
|
||||
|
||||
export class SceneView extends React.Component {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user