react-native/Libraries/NavigationExperimental/NavigationExperimental.js
Hedger Wang 28649b8cf0 Simplify <NavigationCard />.
Summary:Per offline discussion with ericvicenti,  we'd like to reudce the complexity by
keeping <NavigationCard /> nothing more than just a simple `<Animated.View />`,
which helps us to avoid over generalize the styles, gestures of what the Navigation card
needs to be.

The proposalis to use the same props (NavigationSceneRendererProps) that is used to render
the scene to generate the style and pan handlers needed for the navigation card.

No behavior changes, just implementation details clean up work.

Reviewed By: ericvicenti

Differential Revision: D3037225

fb-gh-sync-id: f6e718a282d25a319f5d8efd3e2ffebc66b2c8cb
shipit-source-id: f6e718a282d25a319f5d8efd3e2ffebc66b2c8cb
2016-03-15 15:59:26 -07:00

54 lines
1.8 KiB
JavaScript

/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule NavigationExperimental
* @flow
*/
'use strict';
const NavigationAnimatedView = require('NavigationAnimatedView');
const NavigationCard = require('NavigationCard');
const NavigationCardStack = require('NavigationCardStack');
const NavigationCardStackStyleInterpolator = require('NavigationCardStackStyleInterpolator');
const NavigationContainer = require('NavigationContainer');
const NavigationHeader = require('NavigationHeader');
const NavigationLegacyNavigator = require('NavigationLegacyNavigator');
const NavigationLinearPanResponder = require('NavigationLinearPanResponder');
const NavigationReducer = require('NavigationReducer');
const NavigationRootContainer = require('NavigationRootContainer');
const NavigationStateUtils = require('NavigationStateUtils');
const NavigationView = require('NavigationView');
const NavigationExperimental = {
// Core
StateUtils: NavigationStateUtils,
Reducer: NavigationReducer,
// Containers
Container: NavigationContainer,
RootContainer: NavigationRootContainer,
// Views
View: NavigationView,
AnimatedView: NavigationAnimatedView,
// CustomComponents:
Card: NavigationCard,
CardStack: NavigationCardStack,
Header: NavigationHeader,
LegacyNavigator: NavigationLegacyNavigator,
// Animations Style Interpolators:
CardStackStyleInterpolator: NavigationCardStackStyleInterpolator,
// Interactions:
LinearPanResponder: NavigationLinearPanResponder,
};
module.exports = NavigationExperimental;