2015-02-20 04:10:52 +00:00
|
|
|
/**
|
2015-03-23 20:35:08 +00:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
2015-02-20 04:10:52 +00:00
|
|
|
*
|
|
|
|
* @providesModule ActivityIndicatorIOS
|
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
2016-05-26 20:46:58 +00:00
|
|
|
var ActivityIndicator = require('ActivityIndicator');
|
2016-07-05 13:34:00 +00:00
|
|
|
var NativeMethodsMixin = require('react/lib/NativeMethodsMixin');
|
|
|
|
var PropTypes = require('react/lib/ReactPropTypes');
|
2015-02-20 04:10:52 +00:00
|
|
|
var React = require('React');
|
|
|
|
var View = require('View');
|
|
|
|
|
2016-05-26 20:46:58 +00:00
|
|
|
/**
|
|
|
|
* Deprecated, use ActivityIndicator instead.
|
|
|
|
*/
|
2015-02-20 04:10:52 +00:00
|
|
|
var ActivityIndicatorIOS = React.createClass({
|
|
|
|
mixins: [NativeMethodsMixin],
|
|
|
|
|
|
|
|
propTypes: {
|
2015-11-18 19:34:05 +00:00
|
|
|
...View.propTypes,
|
2015-02-20 04:10:52 +00:00
|
|
|
/**
|
|
|
|
* Whether to show the indicator (true, the default) or hide it (false).
|
|
|
|
*/
|
|
|
|
animating: PropTypes.bool,
|
|
|
|
/**
|
|
|
|
* The foreground color of the spinner (default is gray).
|
|
|
|
*/
|
|
|
|
color: PropTypes.string,
|
2015-04-26 09:22:34 +00:00
|
|
|
/**
|
|
|
|
* Whether the indicator should hide when not animating (true by default).
|
|
|
|
*/
|
|
|
|
hidesWhenStopped: PropTypes.bool,
|
2015-03-18 04:40:17 +00:00
|
|
|
/**
|
|
|
|
* Size of the indicator. Small has a height of 20, large has a height of 36.
|
|
|
|
*/
|
2015-03-04 22:04:52 +00:00
|
|
|
size: PropTypes.oneOf([
|
2015-03-18 04:40:17 +00:00
|
|
|
'small',
|
2015-03-04 22:04:52 +00:00
|
|
|
'large',
|
|
|
|
]),
|
2015-05-16 01:05:49 +00:00
|
|
|
/**
|
|
|
|
* Invoked on mount and layout changes with
|
|
|
|
*
|
|
|
|
* {nativeEvent: { layout: {x, y, width, height}}}.
|
|
|
|
*/
|
|
|
|
onLayout: PropTypes.func,
|
2015-02-20 04:10:52 +00:00
|
|
|
},
|
|
|
|
|
2016-05-26 20:46:58 +00:00
|
|
|
componentDidMount: function() {
|
|
|
|
console.warn('ActivityIndicatorIOS is deprecated. Use ActivityIndicator instead.');
|
2015-02-20 04:10:52 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
render: function() {
|
2016-05-26 20:46:58 +00:00
|
|
|
return <ActivityIndicator {...this.props} />;
|
2015-02-20 04:10:52 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = ActivityIndicatorIOS;
|