File

src/tooltip/tooltip.interface.ts

Description

Tooltip attributes

Index

Properties

Properties

align
align: TooltipAlignments
Type : TooltipAlignments
Optional

Specify the tooltip alignement

caret
caret: boolean
Type : boolean
Optional

Set to false to hide caret

description
description: string | TemplateRef<any>
Type : string | TemplateRef<any>

The string or template content to be exposed by the tooltip.

dropShadow
dropShadow: boolean
Type : boolean
Optional

Set to false to hide shadow

enterDelayMs
enterDelayMs: number
Type : number
Optional

Set delay before tooltip is shown

highContrast
highContrast: boolean
Type : boolean
Optional

Set to true to enable high contrast

isOpen
isOpen: boolean
Type : boolean
Optional

Set to true to have the popover open by default Tooltip will not remain open if user interacts with it (mouseenter & leave) or clicks anywhere in window

leaveDelayMs
leaveDelayMs: number
Type : number
Optional

Set delay when tooltip disappears

import { TemplateRef } from "@angular/core";

export type TooltipAlignments = "top" | "top-left" | "top-right" |
	"bottom" | "bottom-left" | "bottom-right" |
	"left" | "left-bottom" | "left-top" |
	"right" | "right-bottom" | "right-top";

/**
 * Tooltip attributes
 */
export interface TooltipConfig {
	/**
	 * The string or template content to be exposed by the tooltip.
	 */
	description: string | TemplateRef<any>;
	/**
	 * Specify the tooltip alignement
	 */
	align?: TooltipAlignments;
	/**
	 * Set to `false` to hide caret
	 */
	caret?: boolean;
	/**
	 * Set to `false` to hide shadow
	 */
	dropShadow?: boolean;
	/**
	 * Set to `true` to enable high contrast
	 */
	highContrast?: boolean;
	/**
	 * Set to `true` to have the popover open by default
	 * Tooltip will not remain open if user interacts with it (mouseenter & leave) or clicks anywhere in window
	 */
	isOpen?: boolean;
	/**
	 * Set delay before tooltip is shown
	 */
	enterDelayMs?: number;
	/**
	 * Set delay when tooltip disappears
	 */
	leaveDelayMs?: number;
}

/**
 * Default tooltip configuration for components to populate missing interface attributes
 */
export const DEFAULT_TOOLTIP_CONFIG = {
	align: "bottom" as TooltipAlignments,
	caret: true,
	dropShadow: true,
	highContrast: true,
	isOpen: false,
	enterDelayMs: 100,
	leaveDelayMs: 300
};

results matching ""

    No results matching ""