Files
react-native-svg/lib/stopsOpacity.js
Horcrux c2359616bf complete elements percentage props support
Support Rect, Circle, Line, Ellipse percentage props
And support percentage props for gradients
2016-04-27 16:09:38 +08:00

8 lines
221 B
JavaScript

import _ from 'lodash';
export default function (stops, opacity) {
return _.reduce(stops, (ret, color, key) => {
ret[key] = color.alpha(color.alpha() * opacity).rgbaString();
return ret;
}, {});
}