File

projects/tl-elements/src/lib/tl-icon/tl-icon.component.ts

Extends

TamuAbstractBaseComponent

Metadata

Index

Properties
Inputs
HostBindings

Constructor

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

Inputs

color
Type : any

Used to define the color for icon component.

name
Type : string
Default value : 'tamu-logo'

Used to define the name for icon component.

set
Type : string
Default value : 'tl'

Used to define the icon set.

size
Type : any

Used to define the size for icon component.

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.

import { ChangeDetectionStrategy, Component, Injector, Input } from '@angular/core';
import { TamuAbstractBaseComponent } from '../shared/tl-abstract-base.component';

@Component({
  selector: 'tl-icon-component',
  templateUrl: './tl-icon.component.html',
  styleUrls: ['./tl-icon.component.scss'],
  changeDetection: ChangeDetectionStrategy.Default
})
export class TlIconComponent extends TamuAbstractBaseComponent {

  /** Used to define the icon set. */
  @Input() set = 'tl';

  /** Used to define the name for icon component.  */
  @Input() name = 'tamu-logo';

  /** Used to define the color for icon component.  */
  @Input() color;

  /** Used to define the size for icon component.  */
  @Input() size;

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

}
<tl-icon-wrapper #animationRoot>
  <wvr-icon-component
    [color]="color"
    [name]="name"
    [set]="set"
    [size]="size">
  </wvr-icon-component>
</tl-icon-wrapper>

./tl-icon.component.scss

@import "../shared/styles/tl-variables.scss";

:host {
  tl-icon-wrapper {
    display: inline-block;
    margin-left: 5px;
  }

  wvr-icon-component {
    --wvr-icon-color: inherit;
    --wvr-icon-size: inherit;
  }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""