Skip to content

Commit 8587ee2

Browse files
danibonilhafacebook-github-bot
authored andcommitted
- create missing AndroidDrawable flow types in ViewPropTypes.js. (facebook#23192)
Summary: Related to facebook#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: facebook#23192 Differential Revision: D13858907 Pulled By: cpojer fbshipit-source-id: 3633eb019eca2076bb68393b09d06555876f2c48
1 parent b7f3d69 commit 8587ee2

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

Libraries/Components/View/ViewPropTypes.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @format
8-
* @flow
8+
* @flow strict-local
99
*/
1010

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

208+
type AndroidDrawableThemeAttr = $ReadOnly<{|
209+
type: 'ThemeAttrAndroid',
210+
attribute: string,
211+
|}>;
212+
213+
type AndroidDrawableRipple = $ReadOnly<{|
214+
type: 'RippleAndroid',
215+
color?: ?number,
216+
borderless?: ?boolean,
217+
|}>;
218+
219+
type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple;
220+
208221
type AndroidViewProps = $ReadOnly<{|
209-
nativeBackgroundAndroid?: ?Object,
210-
nativeForegroundAndroid?: ?Object,
222+
nativeBackgroundAndroid?: ?AndroidDrawable,
223+
nativeForegroundAndroid?: ?AndroidDrawable,
211224

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

0 commit comments

Comments
 (0)