mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-13 03:49:52 +08:00
RN: Nullable Image, Text, & View Props
Summary: Changes the Flow prop types for `Image`, `Text`, and `View` to be nullable and optional. This makes these components easier to compose. Reviewed By: sahrens Differential Revision: D9494285 fbshipit-source-id: c3f17147f063b31217b239a3abc085d1850f8df9
This commit is contained in:
committed by
Facebook Github Bot
parent
8dc209a523
commit
47dc31d464
@@ -54,7 +54,7 @@ export type ImageProps = {|
|
||||
...$Diff<ViewProps, $ReadOnly<{|style: ?ViewStyleProp|}>>,
|
||||
...IOSImageProps,
|
||||
...AndroidImageProps,
|
||||
blurRadius?: number,
|
||||
blurRadius?: ?number,
|
||||
capInsets?: ?EdgeInsetsProp,
|
||||
|
||||
onError?: ?(event: SyntheticEvent<$ReadOnly<{||}>>) => void,
|
||||
@@ -63,11 +63,11 @@ export type ImageProps = {|
|
||||
onLoadStart?: ?() => void,
|
||||
resizeMethod?: ?('auto' | 'resize' | 'scale'),
|
||||
source?: ?ImageSource,
|
||||
style?: ImageStyleProp,
|
||||
style?: ?ImageStyleProp,
|
||||
|
||||
// Can be set via props or style, for now
|
||||
height?: DimensionValue,
|
||||
width?: DimensionValue,
|
||||
height?: ?DimensionValue,
|
||||
width?: ?DimensionValue,
|
||||
resizeMode?: ?('cover' | 'contain' | 'stretch' | 'repeat' | 'center'),
|
||||
|
||||
src?: empty,
|
||||
|
||||
Reference in New Issue
Block a user