diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicator.js b/Libraries/Components/ActivityIndicator/ActivityIndicator.js index 7d8b9cb77..67d5b8a5d 100644 --- a/Libraries/Components/ActivityIndicator/ActivityIndicator.js +++ b/Libraries/Components/ActivityIndicator/ActivityIndicator.js @@ -70,15 +70,18 @@ type Props = $ReadOnly<{| * See http://facebook.github.io/react-native/docs/activityindicator.html */ const ActivityIndicator = (props: Props, forwardedRef?: any) => { - const {onLayout, style, ...restProps} = props; + const {onLayout, style, size, ...restProps} = props; let sizeStyle; + let sizeProp; - switch (props.size) { + switch (size) { case 'small': sizeStyle = styles.sizeSmall; + sizeProp = 'small'; break; case 'large': sizeStyle = styles.sizeLarge; + sizeProp = 'large'; break; default: sizeStyle = {height: props.size, width: props.size}; @@ -89,6 +92,7 @@ const ActivityIndicator = (props: Props, forwardedRef?: any) => { ...restProps, ref: forwardedRef, style: sizeStyle, + size: sizeProp, styleAttr: 'Normal', indeterminate: true, }; diff --git a/Libraries/Components/ActivityIndicator/RCTActivityIndicatorViewNativeComponent.js b/Libraries/Components/ActivityIndicator/RCTActivityIndicatorViewNativeComponent.js index 461ee0e51..77992f4fb 100644 --- a/Libraries/Components/ActivityIndicator/RCTActivityIndicatorViewNativeComponent.js +++ b/Libraries/Components/ActivityIndicator/RCTActivityIndicatorViewNativeComponent.js @@ -46,7 +46,7 @@ type NativeProps = $ReadOnly<{| * * See http://facebook.github.io/react-native/docs/activityindicator.html#size */ - size?: ?(number | 'small' | 'large'), + size?: ?('small' | 'large'), style?: ?ViewStyleProp, styleAttr?: ?string,