1
1
import * as React from "react" ;
2
2
import { View , StyleSheet , Text } from "react-native" ;
3
- import { ActivityIndicator , withTheme } from "@draftbit/ui" ;
3
+ import { LoadingIndicator , withTheme } from "@draftbit/ui" ;
4
4
import Section , { Container } from "./Section" ;
5
- import { ActivityIndicatorType } from "@draftbit/core/lib/typescript/src/components/ActivityIndicator " ;
5
+ import { LoadingIndicatorType } from "@draftbit/core/lib/typescript/src/components/LoadingIndicator " ;
6
6
7
7
interface WrapperProps {
8
8
label : string ;
@@ -20,66 +20,50 @@ const Wrapper: React.FC<WrapperProps> = ({ label, children }) => {
20
20
) ;
21
21
} ;
22
22
23
- const ActivityIndicatorExample : React . FC = ( ) => {
23
+ const LoadingIndicatorExample : React . FC = ( ) => {
24
24
return (
25
25
< Container style = { { } } >
26
- < Section style = { { } } title = "Default" >
27
- < View style = { { flexDirection : "row" } } >
28
- < Wrapper label = "Small" >
29
- < ActivityIndicator size = "small" />
30
- </ Wrapper >
31
- < Wrapper label = "Large" >
32
- < ActivityIndicator size = "large" />
33
- </ Wrapper >
34
- < Wrapper label = "Size" >
35
- < ActivityIndicator size = { 80 } />
36
- </ Wrapper >
37
- </ View >
38
- </ Section >
39
26
< Section style = { { } } title = "Loading" >
40
27
< View style = { { flexDirection : "row" } } >
41
- < Wrapper label = "Default" >
42
- < ActivityIndicator />
43
- </ Wrapper >
44
28
< Wrapper label = "Plane" >
45
- < ActivityIndicator type = { ActivityIndicatorType . plane } />
29
+ < LoadingIndicator type = { LoadingIndicatorType . plane } />
46
30
</ Wrapper >
47
31
< Wrapper label = "Chase" >
48
- < ActivityIndicator type = { ActivityIndicatorType . chase } />
32
+ < LoadingIndicator type = { LoadingIndicatorType . chase } />
49
33
</ Wrapper >
50
34
< Wrapper label = "Bounce" >
51
- < ActivityIndicator type = { ActivityIndicatorType . bounce } />
35
+ < LoadingIndicator type = { LoadingIndicatorType . bounce } />
52
36
</ Wrapper >
53
37
< Wrapper label = "Wave" >
54
- < ActivityIndicator type = { ActivityIndicatorType . wave } />
38
+ < LoadingIndicator type = { LoadingIndicatorType . wave } />
55
39
</ Wrapper >
56
40
< Wrapper label = "Pulse" >
57
- < ActivityIndicator type = { ActivityIndicatorType . pulse } />
41
+ < LoadingIndicator type = { LoadingIndicatorType . pulse } />
42
+ </ Wrapper >
43
+ < Wrapper label = "Flow" >
44
+ < LoadingIndicator type = { LoadingIndicatorType . flow } />
58
45
</ Wrapper >
59
46
</ View >
60
47
</ Section >
61
48
< Section style = { { } } title = "Loading" >
62
49
< View style = { { flexDirection : "row" } } >
63
- < Wrapper label = "Flow" >
64
- < ActivityIndicator type = { ActivityIndicatorType . flow } />
65
- </ Wrapper >
66
50
< Wrapper label = "Swing" >
67
- < ActivityIndicator type = { ActivityIndicatorType . swing } />
51
+ < LoadingIndicator type = { LoadingIndicatorType . swing } />
68
52
</ Wrapper >
69
53
< Wrapper label = "Circle" >
70
- < ActivityIndicator type = { ActivityIndicatorType . circle } />
54
+ < LoadingIndicator type = { LoadingIndicatorType . circle } />
71
55
</ Wrapper >
72
56
< Wrapper label = "Circle Fade" >
73
- < ActivityIndicator type = { ActivityIndicatorType . circleFade } />
57
+ < LoadingIndicator type = { LoadingIndicatorType . circleFade } />
74
58
</ Wrapper >
75
59
< Wrapper label = "Grid" >
76
- < ActivityIndicator type = { ActivityIndicatorType . grid } />
60
+ < LoadingIndicator type = { LoadingIndicatorType . grid } />
77
61
</ Wrapper >
78
62
< Wrapper label = "Fold" >
79
- < ActivityIndicator type = { ActivityIndicatorType . fold } />
63
+ < LoadingIndicator type = { LoadingIndicatorType . fold } />
80
64
</ Wrapper >
81
65
< Wrapper label = "Wander" >
82
- < ActivityIndicator type = { ActivityIndicatorType . wander } />
66
+ < LoadingIndicator type = { LoadingIndicatorType . wander } />
83
67
</ Wrapper >
84
68
</ View >
85
69
</ Section >
@@ -102,4 +86,4 @@ const styles = StyleSheet.create({
102
86
} ,
103
87
} ) ;
104
88
105
- export default withTheme ( ActivityIndicatorExample ) ;
89
+ export default withTheme ( LoadingIndicatorExample ) ;
0 commit comments