1 | "use strict";
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports["default"] = radialGradient;
|
5 | var _constructGradientValue = _interopRequireDefault(require("../internalHelpers/_constructGradientValue"));
|
6 | var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
7 | var _templateObject;
|
8 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
9 | function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | function radialGradient(_ref) {
|
42 | var colorStops = _ref.colorStops,
|
43 | _ref$extent = _ref.extent,
|
44 | extent = _ref$extent === void 0 ? '' : _ref$extent,
|
45 | fallback = _ref.fallback,
|
46 | _ref$position = _ref.position,
|
47 | position = _ref$position === void 0 ? '' : _ref$position,
|
48 | _ref$shape = _ref.shape,
|
49 | shape = _ref$shape === void 0 ? '' : _ref$shape;
|
50 | if (!colorStops || colorStops.length < 2) {
|
51 | throw new _errors["default"](57);
|
52 | }
|
53 | return {
|
54 | backgroundColor: fallback || colorStops[0].split(' ')[0],
|
55 | backgroundImage: (0, _constructGradientValue["default"])(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["radial-gradient(", "", "", "", ")"])), position, shape, extent, colorStops.join(', '))
|
56 | };
|
57 | }
|
58 | module.exports = exports.default; |
\ | No newline at end of file |