mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 23:24:06 +08:00
Support 'color' attribute in ProgressBarAndroid
Differential Revision: D2625690 fb-gh-sync-id: 34ef656be7ce3304add3fae3e697c6b39b866af1
This commit is contained in:
committed by
facebook-github-bot-0
parent
6a656a1491
commit
a797be6ffd
@@ -15,7 +15,7 @@ var React = require('React');
|
||||
var ReactPropTypes = require('ReactPropTypes');
|
||||
var ReactNativeViewAttributes = require('ReactNativeViewAttributes');
|
||||
|
||||
var createReactNativeComponentClass = require('createReactNativeComponentClass');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
var STYLE_ATTRIBUTES = [
|
||||
'Horizontal',
|
||||
@@ -62,6 +62,10 @@ var ProgressBarAndroid = React.createClass({
|
||||
* - LargeInverse
|
||||
*/
|
||||
styleAttr: ReactPropTypes.oneOf(STYLE_ATTRIBUTES),
|
||||
/**
|
||||
* Color of the progress bar.
|
||||
*/
|
||||
color: ReactPropTypes.string,
|
||||
/**
|
||||
* Used to locate this view in end-to-end tests.
|
||||
*/
|
||||
@@ -81,12 +85,6 @@ var ProgressBarAndroid = React.createClass({
|
||||
},
|
||||
});
|
||||
|
||||
var AndroidProgressBar = createReactNativeComponentClass({
|
||||
validAttributes: {
|
||||
...ReactNativeViewAttributes.UIView,
|
||||
styleAttr: true,
|
||||
},
|
||||
uiViewClassName: 'AndroidProgressBar',
|
||||
});
|
||||
var AndroidProgressBar = requireNativeComponent('AndroidProgressBar', ProgressBarAndroid);
|
||||
|
||||
module.exports = ProgressBarAndroid;
|
||||
|
||||
Reference in New Issue
Block a user