react-native-qrcode-styled
Version:
A fully customizable QR Code generator for React Native based on react-native-svg and javascript-qrcode.
29 lines (28 loc) • 753 B
JavaScript
;
import React from 'react';
import { LinearGradient, Stop } from 'react-native-svg';
import { jsx as _jsx } from "react/jsx-runtime";
export default function SVGLinearGradient({
id,
size,
origin = [0, 0],
start = [0, 0],
end = [1, 1],
colors = ['black', 'white'],
locations = [0, 1]
}) {
return /*#__PURE__*/_jsx(LinearGradient, {
id: id,
gradientUnits: "userSpaceOnUse",
x1: start[0] * size + origin[0],
y1: start[1] * size + origin[1],
x2: end[0] * size + origin[0],
y2: end[1] * size + origin[1],
children: colors?.map((c, i) => /*#__PURE__*/_jsx(Stop, {
offset: locations?.[i],
stopColor: c,
stopOpacity: "1"
}, i))
});
}
//# sourceMappingURL=SVGLinearGradient.js.map