Merge pull request #19686 from RhinobyteSoftware/ryant/master/react-native-onpress-signatures

react-native - Add event object method parameter to onPress signatures
This commit is contained in:
Eloy Durán 2017-09-12 13:14:06 +02:00 committed by GitHub
commit ed00d63d7d

View File

@ -886,13 +886,13 @@ export interface TextProperties extends TextPropertiesIOS, TextPropertiesAndroid
* This function is called on press.
* Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting).
*/
onPress?: () => void
onPress?: (event: GestureResponderEvent) => void
/**
* This function is called on long press.
* e.g., `onLongPress={this.increaseSize}>``
*/
onLongPress?: () => void
onLongPress?: (event: GestureResponderEvent) => void
/**
* @see https://facebook.github.io/react-native/docs/text.html#style
@ -4542,17 +4542,17 @@ export interface TouchableWithoutFeedbackProperties extends TouchableWithoutFeed
*/
onLayout?: (event: LayoutChangeEvent) => void
onLongPress?: () => void;
onLongPress?: (event: GestureResponderEvent) => void;
/**
* Called when the touch is released,
* but not if cancelled (e.g. by a scroll that steals the responder lock).
*/
onPress?: () => void;
onPress?: (event: GestureResponderEvent) => void;
onPressIn?: () => void;
onPressIn?: (event: GestureResponderEvent) => void;
onPressOut?: () => void;
onPressOut?: (event: GestureResponderEvent) => void;
/**
* //FIXME: not in doc but available in examples