Skip to content

Commit

Permalink
RN: Stop Exporting TouchableWithoutFeedback Props
Browse files Browse the repository at this point in the history
Summary:
Changes `TouchableWithoutFeedback` so that `Props` is no longer exported as a Flow type.

Instead, other modules should use `React.ElementConfig<typeof TouchableWithoutFeedback>`.

Changelog:
[General] [Removed] - TouchableWithoutFeedback no longer exports Props. Use React.ElementConfig, instead.

Reviewed By: zackargyle, TheSavior

Differential Revision: D18718131

fbshipit-source-id: 0bd63123c49564fdab160d5fc8e7f1bf86da1fbe
  • Loading branch information
yungsters authored and facebook-github-bot committed Nov 27, 2019
1 parent a516167 commit 7bcae81
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Libraries/Components/Touchable/TouchableBounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import Pressability from '../../Pressability/Pressability.js';
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug.js';
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet.js';
import TVTouchable from './TVTouchable.js';
import type {Props as TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback.js';
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback.js';
import {Animated, Platform} from 'react-native';
import * as React from 'react';

type Props = $ReadOnly<{|
...TouchableWithoutFeedbackProps,
...React.ElementConfig<TouchableWithoutFeedback>,

onPressAnimationComplete?: ?() => void,
onPressWithCompletion?: ?(callback: () => void) => void,
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Components/Touchable/TouchableHighlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {PressabilityDebugView} from '../../Pressability/PressabilityDebug.js';
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet.js';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes.js';
import TVTouchable from './TVTouchable.js';
import type {Props as TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback.js';
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback.js';
import {Platform, StyleSheet, View} from 'react-native';
import * as React from 'react';

Expand All @@ -32,7 +32,7 @@ type IOSProps = $ReadOnly<{|
|}>;

type Props = $ReadOnly<{|
...TouchableWithoutFeedbackProps,
...React.ElementConfig<TouchableWithoutFeedback>,
...AndroidProps,
...IOSProps,

Expand Down
4 changes: 2 additions & 2 deletions Libraries/Components/Touchable/TouchableNativeFeedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
import Pressability from '../../Pressability/Pressability.js';
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug.js';
import TVTouchable from './TVTouchable.js';
import type {Props as TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback.js';
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback.js';
import {Commands} from 'react-native/Libraries/Components/View/ViewNativeComponent';
import ReactNative from 'react-native/Libraries/Renderer/shims/ReactNative';
import type {PressEvent} from 'react-native/Libraries/Types/CoreEventTypes';
import {Platform, View, processColor} from 'react-native';
import * as React from 'react';

type Props = $ReadOnly<{|
...TouchableWithoutFeedbackProps,
...React.ElementConfig<TouchableWithoutFeedback>,

/**
* Determines the type of background drawable that's going to be used to
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Components/Touchable/TouchableOpacity.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import Pressability from '../../Pressability/Pressability.js';
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug.js';
import TVTouchable from './TVTouchable.js';
import type {Props as TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback.js';
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback.js';
import Animated from 'react-native/Libraries/Animated/src/Animated';
import Easing from 'react-native/Libraries/Animated/src/Easing';
import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';
Expand All @@ -31,7 +31,7 @@ type TVProps = $ReadOnly<{|
|}>;

type Props = $ReadOnly<{|
...TouchableWithoutFeedbackProps,
...React.ElementConfig<TouchableWithoutFeedback>,
...TVProps,

activeOpacity?: ?number,
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Touchable/TouchableWithoutFeedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import type {
import {Platform, View} from 'react-native';
import * as React from 'react';

export type Props = $ReadOnly<{|
type Props = $ReadOnly<{|
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
accessibilityElementsHidden?: ?boolean,
accessibilityHint?: ?Stringish,
Expand Down

0 comments on commit 7bcae81

Please sign in to comment.