2020-05-18 14:37:52 +02:00
|
|
|
/**
|
|
|
|
* A single tab page. It renders the passed template
|
|
|
|
* via the @Input properties by using the ngTemplateOutlet
|
|
|
|
* and ngTemplateOutletContext directives.
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { Component, Input } from '@angular/core';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'my-tab',
|
|
|
|
// styles: [
|
|
|
|
// `
|
|
|
|
// .pane{
|
|
|
|
// padding: 1em;
|
|
|
|
// }
|
|
|
|
// `
|
|
|
|
// ],
|
|
|
|
template: `
|
|
|
|
<!-- [class]="active ? 'uk-active' : ''" [hidden]="!active"-->
|
|
|
|
<!-- <div [class]="active ? 'uk-active' : ''" [hidden]="!active">-->
|
2020-05-25 20:58:13 +02:00
|
|
|
<div class="pane">
|
2020-05-18 14:37:52 +02:00
|
|
|
<ng-content></ng-content>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- <div [hidden]="!active" class="pane">-->
|
|
|
|
<!-- <ng-content></ng-content>-->
|
|
|
|
<!-- </div>-->
|
|
|
|
`
|
|
|
|
})
|
|
|
|
export class TabComponent {
|
|
|
|
@Input('tabTitle') title: string;
|
|
|
|
@Input('tabNumber') num: number;
|
|
|
|
@Input('statistics') statistics: boolean = false;
|
|
|
|
@Input('tabId') tabId: string;
|
|
|
|
}
|