File

src/lib/item-list/heading.component.ts

Metadata

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>

Inputs

sticky

Default value: false

Constructor

constructor(ref: ChangeDetectorRef)

Methods

setSticky
setSticky(value: boolean)
Returns: void
setIcon
setIcon(value: boolean)
Returns: void
setCheckbox
setCheckbox(value: boolean)
Returns: void
setBotonera
setBotonera(value: boolean)
Returns: void

Properties

Public hasBotonera
hasBotonera: boolean
Default value: false
Public hasCheckbox
hasCheckbox: boolean
Default value: false
Public hasIcon
hasIcon: boolean
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();
    }
}

results matching ""

    No results matching ""