react-native-linear-gradient/LinearGradient.ios.js

22 lines
491 B
JavaScript
Raw Normal View History

/**
* @providesModule LinearGradient
* @flow
*/
'use strict';
2015-09-29 16:43:22 +00: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 17:44:16 +00:00
module.exports = LinearGradient;