coreui-angular-ex-dev
Version:
CoreUI Components Library for Angular
33 lines (26 loc) • 913 B
text/typescript
import { booleanAttribute, Directive, HostBinding, Input } from '@angular/core';
import { Sizes } from '../coreui.types';
export class ListGroupDirective {
/**
* Remove some borders and rounded corners to render list group items edge-to-edge in a parent component (e.g., `<CCard>`).
* @type boolean
*/
flush: string | boolean = false;
/**
* Specify horizontal layout type.
*/
horizontal?: boolean | Sizes;
get hostClasses(): any {
return {
'list-group': true,
'list-group-horizontal': this.horizontal === true || this.horizontal === '',
[`list-group-horizontal-${this.horizontal}`]: !!this.horizontal && typeof this.horizontal !== 'boolean',
'list-group-flush': this.flush
};
}
}