UNPKG

@hxui/angular

Version:

* * *

35 lines (34 loc) 1.35 kB
import { ChangeDetectorRef } from '@angular/core'; import { Context, Visibility } from '../enums'; import { Observable } from 'rxjs'; export declare class TooltipContentComponent { private _changeDetectionRef; content: string; placement: 'top' | 'bottom' | 'left' | 'right'; context: Context; maxWidth: number; /** Enums to be used in the template **/ contextEnum: typeof Context; visibilityEnum: typeof Visibility; visibility: Visibility; /** Subject for notifying that the tooltip has been hidden from the view */ private readonly _onHide; /** The timeout ID of any current timer set to show the tooltip */ private _showTimeoutId; /** The timeout ID of any current timer set to hide the tooltip */ private _hideTimeoutId; constructor(_changeDetectionRef: ChangeDetectorRef); /** * Shows the tooltip * @param delay Amount of milliseconds to the delay showing the tooltip. */ show(delay: number): void; /** * Hide the tooltip after the provided delay in ms. * @param delay Amount of milliseconds to delay hiding the tooltip. */ hide(delay: number): void; /** Returns an observable that notifies when the tooltip has been hidden from view. */ afterHidden(): Observable<void>; isVisible(): boolean; }