22 lines
491 B
JavaScript
Raw Permalink Normal View History

/**
* @providesModule LinearGradient
* @flow
*/
'use strict';
2015-09-29 12:43:22 -04:00
var React = require('react-native');
var { requireNativeComponent, processColor } = React;
var NativeLinearGradient = requireNativeComponent('BVLinearGradient', null);
var LinearGradient = React.createClass({
render: function() {
var { colors, ...otherProps } = this.props;
return (
<NativeLinearGradient {...otherProps} colors={colors.map(processColor)} />
);
}
});
2015-03-31 10:44:16 -07:00
module.exports = LinearGradient;