Project

General

Profile

1
import {Component, Input} from "@angular/core";
2

    
3
@Component({
4
  selector: 'loading',
5
  template: `
6
    <div *ngIf="loading" class="uk-flex uk-flex-center uk-margin-small-top">
7
      <div class="md-preloader" [ngClass]="'md-preloader-' + color">
8
        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="48" width="48" viewBox="0 0 75 75">
9
          <circle cx="37.5" cy="37.5" r="33.5" stroke-width="4"></circle>
10
        </svg>
11
      </div>
12
    </div>`
13
})
14
export class LoadingComponent {
15
  @Input()
16
  public loading: boolean = false;
17

    
18
  /**
19
   * Possible values '': blue, 'success': green, 'warning': orange and 'danger': red
20
   */
21
  @Input() color: string = '';
22

    
23
  constructor() {
24
  }
25
}
(1-1/2)