From 1343248bbe8e371ba4a4891901ec6f5ded52b7d4 Mon Sep 17 00:00:00 2001 From: James Ide Date: Mon, 23 May 2016 20:39:13 -0700 Subject: [PATCH] Set statics on the NavigationCard container Summary: NavigationCard is wrapped in a container, which breaks statics so apply the statics to the wrapped class instead. Closes https://github.com/facebook/react-native/pull/7483 Differential Revision: D3336226 Pulled By: ericvicenti fbshipit-source-id: ae28e7be7a6227700c2c11081c5605f3667d1494 --- .../NavigationExperimental/NavigationCard.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js b/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js index d117ceb91..d405a7fd0 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js @@ -137,11 +137,6 @@ class NavigationCard extends React.Component { ); } - - static CardStackPanResponder = NavigationCardStackPanResponder; - static CardStackStyleInterpolator = NavigationCardStackStyleInterpolator; - static PagerPanResponder = NavigationPagerPanResponder; - static PagerStyleInterpolator = NavigationPagerStyleInterpolator; } const styles = StyleSheet.create({ @@ -161,4 +156,13 @@ const styles = StyleSheet.create({ NavigationCard = NavigationPointerEventsContainer.create(NavigationCard); +// $FlowFixMe: Figure out how to declare these properties on the container class +NavigationCard.CardStackPanResponder = NavigationCardStackPanResponder; +// $FlowFixMe +NavigationCard.CardStackStyleInterpolator = NavigationCardStackStyleInterpolator; +// $FlowFixMe +NavigationCard.PagerPanResponder = NavigationPagerPanResponder; +// $FlowFixMe +NavigationCard.PagerStyleInterpolator = NavigationPagerStyleInterpolator; + module.exports = NavigationCard;