import {Component, Input, OnInit} from "@angular/core";
@Component({
selector: 'loading',
template: `
`
})
export class LoadingComponent implements OnInit {
@Input() color: string = 'uk-text-primary';
@Input() full: boolean = false;
@Input() top_margin: boolean = true;
@Input() size: "small" | "medium" | "large" = "large";
public style;
constructor() {
}
ngOnInit() {
let size = 1;
if (this.size === 'medium') {
size = 2;
} else if (this.size === "large") {
size = 3;
}
this.style = {
width: size * 20 + 'px',
height: size * 20 + 'px'
};
}
}