mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 05:55:10 +00:00
Support Rect, Circle, Line, Ellipse percentage props And support percentage props for gradients
8 lines
221 B
JavaScript
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;
|
|
}, {});
|
|
}
|