From 23cf49bcd254134f87dcff20274c47a7be11220d Mon Sep 17 00:00:00 2001 From: Sergey Andrievskiy Date: Thu, 4 Apr 2019 15:44:49 +0300 Subject: [PATCH] refactor(tooltip): allow empty value for status --- src/framework/theme/components/tooltip/tooltip.component.ts | 2 +- src/framework/theme/components/tooltip/tooltip.directive.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/theme/components/tooltip/tooltip.component.ts b/src/framework/theme/components/tooltip/tooltip.component.ts index 23fb5eeca5..2633743c33 100644 --- a/src/framework/theme/components/tooltip/tooltip.component.ts +++ b/src/framework/theme/components/tooltip/tooltip.component.ts @@ -86,7 +86,7 @@ export class NbTooltipComponent implements NbRenderableContainer { } @Input() - context: { icon?: string, status?: NbComponentStatus } = {}; + context: { icon?: string, status?: '' | NbComponentStatus } = {}; get statusClass() { return this.context.status ? `status-${this.context.status}` : ''; diff --git a/src/framework/theme/components/tooltip/tooltip.directive.ts b/src/framework/theme/components/tooltip/tooltip.directive.ts index cc9430f2cb..b604f4deea 100644 --- a/src/framework/theme/components/tooltip/tooltip.directive.ts +++ b/src/framework/theme/components/tooltip/tooltip.directive.ts @@ -91,7 +91,7 @@ export class NbTooltipDirective implements OnInit, OnChanges, AfterViewInit, OnD * @param {string} status */ @Input('nbTooltipStatus') - set status(status: NbComponentStatus) { + set status(status: '' | NbComponentStatus) { this.context = Object.assign(this.context, {status}); }