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
This commit is contained in:
James Ide 2016-05-23 20:39:13 -07:00 committed by Facebook Github Bot 4
parent f60cabf34b
commit 1343248bbe

View File

@ -137,11 +137,6 @@ class NavigationCard extends React.Component<any, Props, any> {
</Animated.View>
);
}
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;