Skip to content

Commit

Permalink
Merge branch 'master' into master-siderakis
Browse files Browse the repository at this point in the history
* master:
  RN0.62 fix. xinthink#434 (need to rebuild)
  • Loading branch information
siderakis committed Apr 5, 2020
2 parents 733945d + beba587 commit 2ac630c
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,41 @@ function extractProps(view: Component, propTypes: object) {
return pickBy(filter, view.props);
}

const TouchableWithoutFeedbackPropTypes = [
"accessible",
"accessibilityLabel",
"accessibilityHint",
"accessibilityIgnoresInvertColors",
"accessibilityRole",
"accessibilityState",
"accessibilityActions",
"onAccessibilityAction",
"accessibilityValue",
"accessibilityLiveRegion",
"importantForAccessibility",
"accessibilityViewIsModal",
"accessibilityElementsHidden",
"onFocus",
"onBlur",
"disabled",
"onPress",
"onPressIn",
"onPressOut",
"onLayout",
"touchSoundDisabled",
"onLongPress",
"nativeID",
"testID",
"delayPressIn",
"delayPressOut",
"delayLongPress",
"pressRetentionOffset",
"hitSlop"
];
// Extract Touchable props from the given component instance.
// - {`object`} `view` the component instance
function extractTouchableProps(view: Component) {
return extractProps(view, {
// @ts-ignore: View.propTypes
...TouchableWithoutFeedback.propTypes,
testID: PropTypes.string,
});
return extractProps(view, [...TouchableWithoutFeedbackPropTypes, "testID"]);
}

// @ts-ignore: View.propTypes
Expand Down

0 comments on commit 2ac630c

Please sign in to comment.