-
Notifications
You must be signed in to change notification settings - Fork 2
/
circular-gradient.ts
53 lines (45 loc) · 1.3 KB
/
circular-gradient.ts
1
2
3
4
5
6
7
8
9
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
42
43
44
45
46
47
48
49
50
51
52
53
import { LitElement, nothing } from 'lit';
import { property } from 'lit/decorators.js';
import { registerComponent } from '../common/definitions/register.js';
/**
* Used for defining gradient stops in the igc-circular-progress.
* For each `igc-circular-gradient` defined as `gradient` slot of `igc-circular-progress` element would be created a SVG stop element.
* The values passed as `color`, `offset` and `opacity` would be set as
* `stop-color`, `offset` and `stop-opacity` of the SVG element without further validations.
*
* @element igc-circular-gradient
*
*/
export default class IgcCircularGradientComponent extends LitElement {
public static readonly tagName = 'igc-circular-gradient';
/* blazorSuppress */
public static register() {
registerComponent(this);
}
/**
* Defines where the gradient stop is placed along the gradient vector
* @attr
*/
@property()
public offset = '0%';
/**
* Defines the color of the gradient stop
* @attr
*/
@property()
public color = 'black';
/**
* Defines the opacity of the gradient stop
* @attr
*/
@property({ type: Number })
public opacity = 1;
protected override render() {
return nothing;
}
}
declare global {
interface HTMLElementTagNameMap {
'igc-circular-gradient': IgcCircularGradientComponent;
}
}