Skip to content

Commit

Permalink
fix(popover, tooltip): template check hint for adjustment (#2278)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg authored Mar 16, 2020
1 parent 943ca26 commit a77863d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { NbGlobalLogicalPosition } from './position-helper';
import { GlobalPositionStrategy } from '@angular/cdk/overlay';


export type NbAdjustmentValues = 'noop' | 'clockwise' | 'counterclockwise' | 'vertical' | 'horizontal';
export enum NbAdjustment {
NOOP = 'noop',
CLOCKWISE = 'clockwise',
Expand Down
3 changes: 2 additions & 1 deletion src/framework/theme/components/popover/popover.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {

import { NbDynamicOverlay, NbDynamicOverlayController } from '../cdk/overlay/dynamic/dynamic-overlay';
import { NbDynamicOverlayHandler } from '../cdk/overlay/dynamic/dynamic-overlay-handler';
import { NbAdjustment, NbPosition, NbPositionValues } from '../cdk/overlay/overlay-position';
import { NbAdjustment, NbPosition, NbPositionValues, NbAdjustmentValues } from '../cdk/overlay/overlay-position';
import { NbOverlayContent } from '../cdk/overlay/overlay-service';
import { NbTrigger, NbTriggerValues } from '../cdk/overlay/overlay-trigger';
import { NbPopoverComponent } from './popover.component';
Expand Down Expand Up @@ -161,6 +161,7 @@ export class NbPopoverDirective implements NbDynamicOverlayController, OnChanges
this._adjustment = value;
}
protected _adjustment: NbAdjustment = NbAdjustment.CLOCKWISE;
static ngAcceptInputType_adjustment: NbAdjustmentValues;

/**
* Describes when the container will be shown.
Expand Down
3 changes: 2 additions & 1 deletion src/framework/theme/components/tooltip/tooltip.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { skip, takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';

import { NbComponentStatus } from '../component-status';
import { NbAdjustment, NbPosition, NbPositionValues } from '../cdk/overlay/overlay-position';
import { NbAdjustment, NbPosition, NbPositionValues, NbAdjustmentValues } from '../cdk/overlay/overlay-position';
import { NbTrigger } from '../cdk/overlay/overlay-trigger';
import { NbDynamicOverlay } from '../cdk/overlay/dynamic/dynamic-overlay';
import { NbDynamicOverlayHandler } from '../cdk/overlay/dynamic/dynamic-overlay-handler';
Expand Down Expand Up @@ -111,6 +111,7 @@ export class NbTooltipDirective implements OnInit, OnChanges, AfterViewInit, OnD
this._adjustment = value;
}
protected _adjustment: NbAdjustment = NbAdjustment.CLOCKWISE;
static ngAcceptInputType_adjustment: NbAdjustmentValues;

@Input('nbTooltipClass')
tooltipClass: string = '';
Expand Down

0 comments on commit a77863d

Please sign in to comment.