coreui-angular-ex
Version:
CoreUI Components Library for Angular
42 lines (35 loc) • 1.07 kB
text/typescript
import { booleanAttribute, Component, HostBinding, Input, numberAttribute } from '@angular/core';
({
selector: 'c-progress',
template: '<ng-content></ng-content>',
standalone: true
})
export class ProgressComponent {
/**
* Sets the height of the component. If you set that value the inner `<CProgressBar>` will automatically resize accordingly.
* @type number
*/
({ transform: numberAttribute }) height: string | number = 0;
/**
* Displays thin progress.
* @type boolean
*/
({ transform: booleanAttribute }) thin: string | boolean = false;
/**
* Change the default color to white.
* @type boolean
*/
({ transform: booleanAttribute }) white: string | boolean = false;
('class')
get hostClasses(): any {
return {
progress: true,
'progress-thin': this.thin,
'progress-white': this.white
};
}
('style.height')
get hostStyle(): any {
return !!this.height ? `${this.height}px` : '';
}
}