From 13d74cf79adcf77f4bf633e1559a315d9d59fad2 Mon Sep 17 00:00:00 2001 From: Sergey Andrievskiy Date: Wed, 28 Aug 2019 14:50:45 +0300 Subject: [PATCH] refactor(tabset): accept icon config --- .../components/route-tabset/route-tabset.component.ts | 2 +- .../theme/components/tabset/tabset.component.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/framework/theme/components/route-tabset/route-tabset.component.ts b/src/framework/theme/components/route-tabset/route-tabset.component.ts index df0ecf0b10..00def6f844 100644 --- a/src/framework/theme/components/route-tabset/route-tabset.component.ts +++ b/src/framework/theme/components/route-tabset/route-tabset.component.ts @@ -88,7 +88,7 @@ import { convertToBoolProperty } from '../helpers'; class="route-tab disabled" tabindex="-1"> - + {{ tab.title }} diff --git a/src/framework/theme/components/tabset/tabset.component.ts b/src/framework/theme/components/tabset/tabset.component.ts index 89bb133c27..818a3b7855 100644 --- a/src/framework/theme/components/tabset/tabset.component.ts +++ b/src/framework/theme/components/tabset/tabset.component.ts @@ -21,6 +21,7 @@ import { ActivatedRoute } from '@angular/router'; import { convertToBoolProperty } from '../helpers'; import { NbComponentStatus } from '../component-status'; import { NbBadgePosition } from '../badge/badge.component'; +import { NbIconConfig } from '../icon/icon.component'; /** * Specific tab container. @@ -50,10 +51,10 @@ export class NbTabComponent { @Input() tabTitle: string; /** - * Tab icon - * @type {string} + * Tab icon name or icon config object + * @type {string | NbIconConfig} */ - @Input() tabIcon: string; + @Input() tabIcon: string | NbIconConfig; /** * Item is disabled and cannot be opened. @@ -248,7 +249,7 @@ export class NbTabComponent { [attr.tabindex]="tab.disabled ? -1 : 0" class="tab"> - + {{ tab.tabTitle }}