Skip to content

Commit

Permalink
- create missing AndroidDrawable flow types in ViewPropTypes.js. (#23192
Browse files Browse the repository at this point in the history
)

Summary:
Related to #22100

Enhance last ViewPropTypes flow types.

- [x] yarn run prettier
- [x] yarn run flow-check-ios
- [x] yarn run flow-check-android

[GENERAL] [ENHANCEMENT] [ViewPropTypes.js] - Enhance Flow types definitions
Pull Request resolved: #23192

Differential Revision: D13858907

Pulled By: cpojer

fbshipit-source-id: 3633eb019eca2076bb68393b09d06555876f2c48
  • Loading branch information
danibonilha authored and facebook-github-bot committed Jan 29, 2019
1 parent 9a93704 commit 7ff9456
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions Libraries/Components/View/ViewPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @flow strict-local
*/

'use strict';
Expand Down Expand Up @@ -205,9 +205,22 @@ type GestureResponderEventProps = $ReadOnly<{|
onStartShouldSetResponderCapture?: ?(e: PressEvent) => boolean,
|}>;

type AndroidDrawableThemeAttr = $ReadOnly<{|
type: 'ThemeAttrAndroid',
attribute: string,
|}>;

type AndroidDrawableRipple = $ReadOnly<{|
type: 'RippleAndroid',
color?: ?number,
borderless?: ?boolean,
|}>;

type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple;

type AndroidViewProps = $ReadOnly<{|
nativeBackgroundAndroid?: ?Object,
nativeForegroundAndroid?: ?Object,
nativeBackgroundAndroid?: ?AndroidDrawable,
nativeForegroundAndroid?: ?AndroidDrawable,

/**
* Whether this `View` should render itself (and all of its children) into a
Expand Down

0 comments on commit 7ff9456

Please sign in to comment.