coreui-angular-ex
Version:
CoreUI Components Library for Angular
28 lines (24 loc) • 699 B
text/typescript
import { booleanAttribute, Directive, HostBinding, Input } from '@angular/core';
import { ButtonDirective } from './button.directive';
export class ButtonCloseDirective extends ButtonDirective {
/**
* Change the default color to white.
* @type boolean
*/
white: string | boolean = false;
override get hostClasses(): any {
return {
btn: true,
'btn-close': true,
'btn-close-white': this.white,
[`btn-${this.size}`]: !!this.size,
disabled: this.disabled,
active: this.active
};
}
}