react-native-qrcode-styled
Version:
A fully customizable QR Code generator for React Native based on react-native-svg and javascript-qrcode.
34 lines (33 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = SVGLinearGradient;
var _react = _interopRequireDefault(require("react"));
var _reactNativeSvg = require("react-native-svg");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function SVGLinearGradient({
id,
size,
origin = [0, 0],
start = [0, 0],
end = [1, 1],
colors = ['black', 'white'],
locations = [0, 1]
}) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.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__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
offset: locations?.[i],
stopColor: c,
stopOpacity: "1"
}, i))
});
}
//# sourceMappingURL=SVGLinearGradient.js.map