diff --git a/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js b/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js index 48d6ee0ddd7f96..bc2d26560c7e93 100644 --- a/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +++ b/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js @@ -41,7 +41,7 @@ type NativeProps = $ReadOnly<{| */ progressBackgroundColor?: ?ColorValue, /** - * Size of the refresh indicator, see RefreshControl.SIZE. + * Size of the refresh indicator. */ size?: WithDefault<'default' | 'large', 'default'>, /** diff --git a/Libraries/Components/RefreshControl/RefreshControl.js b/Libraries/Components/RefreshControl/RefreshControl.js index a85c820791d1e1..f9eb5381c54098 100644 --- a/Libraries/Components/RefreshControl/RefreshControl.js +++ b/Libraries/Components/RefreshControl/RefreshControl.js @@ -22,18 +22,6 @@ import PullToRefreshViewNativeComponent, { Commands as PullToRefreshCommands, } from './PullToRefreshViewNativeComponent'; -let RefreshLayoutConsts: any; -if (Platform.OS === 'android') { - const AndroidSwipeRefreshLayout = require('../../ReactNative/UIManager').getViewManagerConfig( - 'AndroidSwipeRefreshLayout', - ); - RefreshLayoutConsts = AndroidSwipeRefreshLayout - ? AndroidSwipeRefreshLayout.Constants - : {SIZE: {}}; -} else { - RefreshLayoutConsts = {SIZE: {}}; -} - type IOSProps = $ReadOnly<{| /** * The color of the refresh indicator. @@ -63,12 +51,9 @@ type AndroidProps = $ReadOnly<{| */ progressBackgroundColor?: ?ColorValue, /** - * Size of the refresh indicator, see RefreshControl.SIZE. + * Size of the refresh indicator. */ - size?: ?( - | typeof RefreshLayoutConsts.SIZE.DEFAULT - | typeof RefreshLayoutConsts.SIZE.LARGE - ), + size?: ?('default' | 'large'), /** * Progress view top offset */ @@ -137,8 +122,6 @@ export type RefreshControlProps = $ReadOnly<{| * in the `onRefresh` function otherwise the refresh indicator will stop immediately. */ class RefreshControl extends React.Component { - static SIZE: any = RefreshLayoutConsts.SIZE; - _nativeRef: ?React.ElementRef< | typeof PullToRefreshViewNativeComponent | typeof AndroidSwipeRefreshLayoutNativeComponent,