mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Updates from Wed Mar 4
- [react-packager] Start converting options to query params | Amjad Masad - [ReactNative] Replace js long constants with strings | Tadeu Zagallo - React Native: Remove Unnecessary `document.body` Shim | Tim Yung - [ReactNative] Use spread operator and .propTypes for ScrollView/ListView | Christopher Chedeau
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
var NativeMethodsMixin = require('NativeMethodsMixin');
|
||||
var NativeModulesDeprecated = require('NativeModulesDeprecated');
|
||||
var NativeModules = require('NativeModules');
|
||||
var PropTypes = require('ReactPropTypes');
|
||||
var React = require('React');
|
||||
var ReactIOSViewAttributes = require('ReactIOSViewAttributes');
|
||||
@@ -37,12 +37,11 @@ var ActivityIndicatorIOS = React.createClass({
|
||||
* The foreground color of the spinner (default is gray).
|
||||
*/
|
||||
color: PropTypes.string,
|
||||
/**
|
||||
* The size of the spinner, must be one of:
|
||||
* - ActivityIndicatorIOS.size.large
|
||||
* - ActivityIndicatorIOS.size.small (default)
|
||||
*/
|
||||
size: PropTypes.oneOf([SpinnerSize.large, SpinnerSize.small]),
|
||||
|
||||
size: PropTypes.oneOf([
|
||||
'small', // default
|
||||
'large',
|
||||
]),
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
@@ -53,15 +52,11 @@ var ActivityIndicatorIOS = React.createClass({
|
||||
};
|
||||
},
|
||||
|
||||
statics: {
|
||||
size: SpinnerSize,
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var style = styles.sizeSmall;
|
||||
var NativeConstants = NativeModulesDeprecated.RKUIManager.UIActivityIndicatorView.Constants;
|
||||
var NativeConstants = NativeModules.RKUIManager.UIActivityIndicatorView.Constants;
|
||||
var activityIndicatorViewStyle = NativeConstants.StyleWhite;
|
||||
if (this.props.size == SpinnerSize.large) {
|
||||
if (this.props.size === 'large') {
|
||||
style = styles.sizeLarge;
|
||||
activityIndicatorViewStyle = NativeConstants.StyleWhiteLarge;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user