File tree 5 files changed +17
-68
lines changed
Libraries/Components/ActivityIndicator 5 files changed +17
-68
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
*/
11
11
12
12
'use strict' ;
13
+ import type { HostComponent } from '../../Renderer/shims/ReactNativeTypes' ;
13
14
import type { ViewProps } from '../View/ViewPropTypes' ;
14
- import type { ActivityIndicator as ActivityIndicatorType } from './ActivityIndicator.flow' ;
15
15
16
16
import StyleSheet , { type ColorValue } from '../../StyleSheet/StyleSheet' ;
17
17
import Platform from '../../Utilities/Platform' ;
@@ -184,8 +184,10 @@ const ActivityIndicator = (
184
184
```
185
185
*/
186
186
187
- const ActivityIndicatorWithRef : ActivityIndicatorType =
188
- React . forwardRef ( ActivityIndicator ) ;
187
+ const ActivityIndicatorWithRef : React . AbstractComponent <
188
+ Props ,
189
+ HostComponent < mixed > ,
190
+ > = React . forwardRef ( ActivityIndicator ) ;
189
191
ActivityIndicatorWithRef . displayName = 'ActivityIndicator' ;
190
192
191
193
const styles = StyleSheet . create ( {
@@ -203,4 +205,4 @@ const styles = StyleSheet.create({
203
205
} ,
204
206
} ) ;
205
207
206
- module . exports = ActivityIndicatorWithRef ;
208
+ export default ActivityIndicatorWithRef ;
Original file line number Diff line number Diff line change 11
11
12
12
'use strict' ;
13
13
14
+ import * as React from 'react' ;
15
+
14
16
const ReactNativeTestTools = require ( '../../../Utilities/ReactNativeTestTools' ) ;
15
- const ActivityIndicator = require ( '../ActivityIndicator' ) ;
16
- const React = require ( 'react' ) ;
17
+ const ActivityIndicator = require ( '../ActivityIndicator' ) . default ;
17
18
18
19
describe ( '<ActivityIndicator />' , ( ) => {
19
20
it ( 'should set displayName to prevent <Component /> regressions' , ( ) => {
Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ module.exports = {
108
108
. default ;
109
109
} ,
110
110
get ActivityIndicator ( ) : ActivityIndicator {
111
- return require ( './Libraries/Components/ActivityIndicator/ActivityIndicator' ) ;
111
+ return require ( './Libraries/Components/ActivityIndicator/ActivityIndicator' )
112
+ . default ;
112
113
} ,
113
114
get Button ( ) : Button {
114
115
return require ( './Libraries/Components/Button' ) ;
Original file line number Diff line number Diff line change @@ -164,11 +164,14 @@ jest
164
164
const mockScrollView = jest . requireActual ( './mockScrollView' ) ;
165
165
return mockScrollView ( baseComponent ) ;
166
166
} )
167
- . mock ( '../Libraries/Components/ActivityIndicator/ActivityIndicator' , ( ) =>
168
- mockComponent (
167
+ . mock ( '../Libraries/Components/ActivityIndicator/ActivityIndicator' , ( ) => ( {
168
+ __esModule : true ,
169
+ default : mockComponent (
169
170
'../Libraries/Components/ActivityIndicator/ActivityIndicator' ,
171
+ null ,
172
+ true ,
170
173
) ,
171
- )
174
+ } ) )
172
175
. mock ( '../Libraries/AppState/AppState' , ( ) => ( {
173
176
addEventListener : jest . fn ( ( ) => ( {
174
177
remove : jest . fn ( ) ,
You can’t perform that action at this time.
0 commit comments