unicorn-components
Version:
<a target="_blank" href="https://getunicorn.io"><img src="https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2017/Jul/07/2615006260-5-nitsnetsstudios-ondemand-UNI_avatar.png" align="left"></a>
24 lines (19 loc) • 1.06 kB
text/typescript
import { Component, HostBinding, Input, OnChanges } from '@angular/core';
import { UniColor } from '../../../models/types';
export class UniSpinnerComponent {
componentClass = true;
get isDots() { return this.type === 'dots'; }
get isCircle() { return this.type === 'circle'; }
get isSmall() { return this.size === 'small'; }
get isBig() { return this.size === 'big'; }
get isPrimary() { return this.color === 'primary'; }
get isError() { return this.color === 'error'; }
get isSuccess() { return this.color === 'success'; }
color: UniColor;
size: 'small' | 'big';
type: 'circle' | 'dots' = 'circle';
}