File tree 3 files changed +27
-4
lines changed
3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -3,26 +3,25 @@ const React = require('react-native')
3
3
4
4
const {
5
5
Animated,
6
- ActivityIndicatorIOS,
7
6
Component,
8
7
View,
9
8
Text,
10
9
StyleSheet,
11
10
TouchableOpacity
12
11
} = React
13
12
13
+ var ProgressBar = require ( './ProgressBar' ) ;
14
14
15
15
class InnerButtonView extends Component {
16
16
17
17
render ( ) {
18
18
return (
19
19
< View style = { styles . insideView } >
20
- { this . props . currentStateObject . spinner ? < ActivityIndicatorIOS color = { this . props . spinnerColor } style = { styles . activityIndicator } /> : null }
20
+ { this . props . currentStateObject . spinner ? < ProgressBar color = { this . props . spinnerColor } style = { styles . activityIndicator } /> : null }
21
21
< Text style = { this . props . labelStyle } > { this . props . currentStateObject . text } </ Text >
22
22
</ View >
23
23
)
24
24
}
25
-
26
25
}
27
26
28
27
@@ -134,4 +133,4 @@ const styles = StyleSheet.create({
134
133
} )
135
134
136
135
137
- module . exports = AwesomeButton
136
+ module . exports = AwesomeButton
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ var React = require ( 'react-native' ) ;
4
+ var {
5
+ Platform,
6
+ ActivityIndicatorIOS,
7
+ ProgressBarAndroid,
8
+ } = React ;
9
+
10
+ var ProgressBar = React . createClass ( {
11
+ render ( ) {
12
+ if ( Platform . OS === 'ios' ) {
13
+ return (
14
+ < ActivityIndicatorIOS color = { this . props . color } style = { this . props . style } />
15
+ ) ;
16
+ } else {
17
+ return (
18
+ < ProgressBarAndroid color = { this . props . color } style = { this . props . style } styleAttr = { "Small" } />
19
+ ) ;
20
+ }
21
+ }
22
+ } ) ;
23
+
24
+ module . exports = ProgressBar ;
You can’t perform that action at this time.
0 commit comments