File

projects/tl-elements/src/lib/shared/tl-abstract-base.component.ts

Extends

WvrBaseComponent

Index

Properties
Inputs
HostBindings
Accessors

Constructor

constructor(injector: Injector)
Parameters :
Name Type Optional
injector Injector No

Inputs

inheritFontStyle
Type : "true" | "false"

HostBindings

style.--tl-font-family-sans-serif
Type : string
Default value : 'var(--tl-default-font-family-sans-serif)'

Allows for the override of the --tl-font-family-sans-serif css variable.

style.--tl-font-size
Type : string
Default value : 'var(--tl-default-font-size)'

Allows for the override of the --tl-default-font-size css variable.

Properties

_fontFamily
Type : string
Default value : 'var(--tl-default-font-family-sans-serif)'
Decorators :
@HostBinding('style.--tl-font-family-sans-serif')

Allows for the override of the --tl-font-family-sans-serif css variable.

_fontSize
Type : string
Default value : 'var(--tl-default-font-size)'
Decorators :
@HostBinding('style.--tl-font-size')

Allows for the override of the --tl-default-font-size css variable.

Accessors

inheritFontStyle
setinheritFontStyle(value: "true" | "false")
Parameters :
Name Type Optional
value "true" | "false" No
Returns : void
import { Directive, HostBinding, Injector, Input } from '@angular/core';
import { WvrBaseComponent } from '@wvr/elements';

@Directive()
// tslint:disable-next-line:directive-class-suffix
export abstract class TamuAbstractBaseComponent extends WvrBaseComponent {

  /** Allows for the override of the --tl-default-font-size css variable. */
  @HostBinding('style.--tl-font-size') _fontSize = 'var(--tl-default-font-size)';

  /** Allows for the override of the --tl-font-family-sans-serif css variable. */
  @HostBinding('style.--tl-font-family-sans-serif') _fontFamily = 'var(--tl-default-font-family-sans-serif)';

  @Input() set inheritFontStyle(value: 'true' | 'false') {
    this._fontSize = (value === 'true') ? 'inherit' : 'var(--tl-default-font-size)';
    this._fontFamily = (value === 'true') ? 'inherit' : 'var(--tl-default-font-family-sans-serif)';
  }

  // tslint:disable-next-line:unnecessary-constructor
  constructor(injector: Injector) {
    super(injector);
  }

}

results matching ""

    No results matching ""