var React = require('react-native'); var flattenStyle = require('flattenStyle'); var { requireNativeComponent, PropTypes, View, processColor } = React; var LinearGradient = React.createClass({ propTypes: { start: PropTypes.array, end: PropTypes.array, colors: PropTypes.array.isRequired, locations: PropTypes.array, ...View.propTypes, }, render: function() { var {style, children, colors, locations, start, end, ...otherProps} = this.props; // inherit container borderRadius until this issue is resolved: // https://github.com/facebook/react-native/issues/3198 var borderRadius = flattenStyle(style).borderRadius || 0; return ( { children } ); } }) var NativeLinearGradient = requireNativeComponent('BVLinearGradient', LinearGradient); module.exports = LinearGradient;