mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
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:
commit
ed00d63d7d
12
types/react-native/index.d.ts
vendored
12
types/react-native/index.d.ts
vendored
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user