@fbltd/math 1.0.43 → 1.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,10 +15,10 @@ export class ConicGradient extends BaseGradient {
15
15
  */
16
16
  toCSS() {
17
17
  let s = '';
18
- for (let color of this.colors) {
18
+ for (let { color } of this.colors) {
19
19
  if (s)
20
20
  s += ',';
21
- s += `rgb(${color.color.red},${color.color.green},${color.color.blue})`;
21
+ s += color;
22
22
  }
23
23
  s = `conic-gradient(in srgb from 0.25turn at 50% 50%, ${s})`;
24
24
  return s;
@@ -9,11 +9,11 @@ export class LinearGradient extends BaseGradient {
9
9
  }
10
10
  toCSS(direction = 'to bottom') {
11
11
  let s = '';
12
- for (let color of this.colors) {
12
+ for (let { color } of this.colors) {
13
13
  if (s)
14
14
  s += ',';
15
- s += `rgb(${color.color.red},${color.color.green},${color.color.blue})`;
15
+ s += color;
16
16
  }
17
- return `conic-gradient(${direction}, ${s})`;
17
+ return `linear-gradient(${direction}, ${s})`;
18
18
  }
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fbltd/math",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "description": "Math and geometry utilities",
5
5
  "sideEffects": false,
6
6
  "main": "dist/bin/index.js",