src/lib/item-list/heading.component.ts
selector | plex-heading |
template | <section> |
sticky
|
Default value: |
constructor(ref: ChangeDetectorRef)
|
setSticky |
setSticky(value: boolean)
|
Returns:
void
|
setIcon |
setIcon(value: boolean)
|
Returns:
void
|
setCheckbox |
setCheckbox(value: boolean)
|
Returns:
void
|
setBotonera |
setBotonera(value: boolean)
|
Returns:
void
|
Public hasBotonera |
hasBotonera: |
Default value: false
|
Public hasCheckbox |
hasCheckbox: |
Default value: false
|
Public hasIcon |
hasIcon: |
Default value: false
|
import { Component, ChangeDetectorRef, Input } from '@angular/core';
@Component({
selector: 'plex-heading',
template: `
<section>
<div class="item-list-heading"
[class.sticky]="sticky"
[class.has-icon]="hasIcon"
[class.has-checkbox]="hasCheckbox"
[class.has-botonera]="hasBotonera">
<ng-content selector="label"></ng-content>
</div>
</section>
`
})
export class PlexHeadingComponent {
@Input() sticky = false;
constructor(
private ref: ChangeDetectorRef
) {
}
public hasIcon = false;
public hasCheckbox = false;
public hasBotonera = false;
setSticky(value: boolean) {
this.sticky = value;
this.ref.detectChanges();
}
setIcon(value: boolean) {
this.hasIcon = value;
this.ref.detectChanges();
}
setCheckbox(value: boolean) {
this.hasCheckbox = value;
this.ref.detectChanges();
}
setBotonera(value: boolean) {
this.hasBotonera = value;
this.ref.detectChanges();
}
}