mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 11:57:46 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot 9
parent
6c5195fb3a
commit
28649b8cf0
@@ -68,9 +68,26 @@ const SceneRenderer = {
|
||||
scenes: PropTypes.arrayOf(scene).isRequired,
|
||||
};
|
||||
|
||||
/* NavigationPanPanHandlers */
|
||||
const panHandlers = PropTypes.shape({
|
||||
onMoveShouldSetResponder: PropTypes.func.isRequired,
|
||||
onMoveShouldSetResponderCapture: PropTypes.func.isRequired,
|
||||
onResponderEnd: PropTypes.func.isRequired,
|
||||
onResponderGrant: PropTypes.func.isRequired,
|
||||
onResponderMove: PropTypes.func.isRequired,
|
||||
onResponderReject: PropTypes.func.isRequired,
|
||||
onResponderRelease: PropTypes.func.isRequired,
|
||||
onResponderStart: PropTypes.func.isRequired,
|
||||
onResponderTerminate: PropTypes.func.isRequired,
|
||||
onResponderTerminationRequest: PropTypes.func.isRequired,
|
||||
onStartShouldSetResponder: PropTypes.func.isRequired,
|
||||
onStartShouldSetResponderCapture: PropTypes.func.isRequired,
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
SceneRenderer,
|
||||
action,
|
||||
navigationParentState,
|
||||
navigationState,
|
||||
panHandlers,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user