Permalink
Browse files

RN: Add Missing Events to ViewPropTypes

Reviewed By: TheSavior

Differential Revision: D7984937

fbshipit-source-id: fc2703e3382a7515b71f8a634aca5b6d7a5b25b4
  • Loading branch information...
yungsters authored and facebook-github-bot committed May 13, 2018
1 parent 3d3edfc commit 41a940392cea497bc5eb627b24083d0211d1eb89
Showing with 36 additions and 14 deletions.
  1. +36 −14 Libraries/Components/View/ViewPropTypes.js
@@ -35,7 +35,43 @@ const stylePropType = StyleSheetPropType(ViewStylePropTypes);
export type ViewLayout = Layout;
export type ViewLayoutEvent = LayoutEvent;
type DirectEventProps = $ReadOnly<{|
onAccessibilityAction?: Function,
onAccessibilityTap?: Function,
onLayout?: ?(event: LayoutEvent) => void,
onMagicTap?: Function,
|}>;
type TouchEventProps = $ReadOnly<{|
onTouchCancel?: ?Function,
onTouchCancelCapture?: ?Function,
onTouchEnd?: ?Function,
onTouchEndCapture?: ?Function,
onTouchMove?: ?Function,
onTouchMoveCapture?: ?Function,
onTouchStart?: ?Function,
onTouchStartCapture?: ?Function,
|}>;
type GestureResponderEventProps = $ReadOnly<{|
onMoveShouldSetResponder?: ?Function,
onMoveShouldSetResponderCapture?: ?Function,
onResponderGrant?: ?Function,
onResponderMove?: ?Function,
onResponderReject?: ?Function,
onResponderRelease?: ?Function,
onResponderStart?: ?Function,
onResponderTerminate?: ?Function,
onResponderTerminationRequest?: ?Function,
onStartShouldSetResponder?: ?Function,
onStartShouldSetResponderCapture?: ?Function,
|}>;
export type ViewProps = $ReadOnly<{|
...DirectEventProps,
...GestureResponderEventProps,
...TouchEventProps,
// There's no easy way to create a different type if (Platform.isTVOS):
// so we must include TVViewProps
...TVViewProps,
@@ -55,22 +91,8 @@ export type ViewProps = $ReadOnly<{|
accessibilityViewIsModal?: boolean,
accessibilityElementsHidden?: boolean,
children?: ?React.Node,
onAccessibilityAction?: Function,
onAccessibilityTap?: Function,
onMagicTap?: Function,
testID?: ?string,
nativeID?: string,
onLayout?: ?(event: LayoutEvent) => void,
onResponderGrant?: ?Function,
onResponderMove?: ?Function,
onResponderReject?: ?Function,
onResponderRelease?: ?Function,
onResponderTerminate?: ?Function,
onResponderTerminationRequest?: ?Function,
onStartShouldSetResponder?: ?Function,
onStartShouldSetResponderCapture?: ?Function,
onMoveShouldSetResponder?: ?Function,
onMoveShouldSetResponderCapture?: ?Function,
hitSlop?: ?EdgeInsetsProp,
pointerEvents?: null | 'box-none' | 'none' | 'box-only' | 'auto',
style?: stylePropType,

0 comments on commit 41a9403

Please sign in to comment.