8 } from "@angular/core";
9 import * as _ from 'lodash';
12 selector : 'vid-svg-icon',
19 [clickable]="clickable">
25 export class SvgComponent implements AfterViewChecked{
26 @Input() mode : string = 'primary';
27 @Input() size : string = 'large';
28 @Input() testId : string = null;
29 @Input() name : string = null;
30 @Input() clickable : boolean = false;
31 @Input() fill : string ;
32 @Input() widthViewBox: string = null;
33 @Input() heightViewBox: string = null;
35 constructor(private elRef: ElementRef) {}
37 ngAfterViewChecked(): void {
38 if(!_.isNil(this.fill)){
39 this.elRef.nativeElement.children[0].children[0].children[0].style.fill = this.fill;
42 if(this.widthViewBox && this.heightViewBox){
43 this.elRef.nativeElement.children[0].children[0].children[0].setAttribute('viewBox', "1 1 " + this.widthViewBox + " " + this.heightViewBox)