projects/tl-elements/src/lib/tl-tabs/tl-tab/tl-tab.component.ts
changeDetection | ChangeDetectionStrategy.Default |
selector | tl-tab-component |
styleUrls | ./tl-tab.component.scss |
templateUrl | ./tl-tab.component.html |
Properties |
Inputs |
HostBindings |
constructor(injector: Injector)
|
||||||
Parameters :
|
tabText | |
Type : string
|
|
Default value : `Tab ${this.id}`
|
|
inheritFontStyle | |
Type : "true" | "false"
|
|
Inherited from
TamuAbstractBaseComponent
|
|
Defined in
TamuAbstractBaseComponent:14
|
style.--tl-font-family-sans-serif |
Type : string
|
Default value : 'var(--tl-default-font-family-sans-serif)'
|
Inherited from
TamuAbstractBaseComponent
|
Defined in
TamuAbstractBaseComponent:12
|
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)'
|
Inherited from
TamuAbstractBaseComponent
|
Defined in
TamuAbstractBaseComponent:9
|
Allows for the override of the --tl-default-font-size css variable. |
_fontFamily |
Type : string
|
Default value : 'var(--tl-default-font-family-sans-serif)'
|
Decorators :
@HostBinding('style.--tl-font-family-sans-serif')
|
Inherited from
TamuAbstractBaseComponent
|
Defined in
TamuAbstractBaseComponent:12
|
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')
|
Inherited from
TamuAbstractBaseComponent
|
Defined in
TamuAbstractBaseComponent:9
|
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-tab-component',
templateUrl: './tl-tab.component.html',
styleUrls: ['./tl-tab.component.scss'],
changeDetection: ChangeDetectionStrategy.Default
})
export class TlTabComponent extends TamuAbstractBaseComponent {
@Input() tabText = `Tab ${this.id}`;
// tslint:disable-next-line:unnecessary-constructor
constructor(injector: Injector) {
super(injector);
}
}
<wvr-tab-component [tabText]="tabText">
<ng-content></ng-content>
</wvr-tab-component>
./tl-tab.component.scss
@import "../../shared/styles/tl-variables.scss";
:host {
::ng-deep {
.nav-item {
display: inline-block;
.nav-link {
border: 1px solid var(--tl-grey);
border-top: 5px solid var(--tl-grey);
border-radius: 0px 0px 0 0;
color: #5a534d;
}
.nav-link:hover,
.nav-link.active {
color: #000000;
background-color: #fff;
border-top: 5px solid var(--tl-primary);
}
.nav-link:hover {
border-bottom: 1px solid var(--tl-grey);
}
}
}
}