Skip to content
Snippets Groups Projects
Commit d214dfde authored by Alexander Reifschneider's avatar Alexander Reifschneider
Browse files

OZG-7367 rename type

parent 79bcc303
No related branches found
No related tags found
1 merge request!2OZG-7367 Extend tooltip directive
......@@ -43,7 +43,7 @@ export enum TooltipPosition {
BELOW = 'below',
}
const OUTLINE_INDENT = 4; // Outline offset (2) + outline width (2)
type ariaType = 'aria-describedby' | 'aria-labelledby';
type TooltipAriaType = 'aria-describedby' | 'aria-labelledby';
@Directive({
selector: '[tooltip]',
......@@ -52,7 +52,7 @@ type ariaType = 'aria-describedby' | 'aria-labelledby';
export class TooltipDirective implements AfterViewInit, OnDestroy {
@Input() tooltip: string = '';
@Input() tooltipPosition: TooltipPosition = TooltipPosition.BELOW;
@Input() tooltipAriaType: ariaType = 'aria-describedby';
@Input() tooltipAriaType: TooltipAriaType = 'aria-describedby';
componentRef: ComponentRef<TooltipComponent> = null;
parentElement: HTMLElement = null;
......@@ -172,11 +172,11 @@ export class TooltipDirective implements AfterViewInit, OnDestroy {
this.setAutoPosition(height, parentRect, window.innerHeight);
}
setAriaAttribute(ariaType: ariaType): void {
setAriaAttribute(ariaType: TooltipAriaType): void {
this.renderer.setAttribute(this.parentElement, ariaType, this.tooltipId);
}
removeAriaAttribute(ariaType: ariaType): void {
removeAriaAttribute(ariaType: TooltipAriaType): void {
this.renderer.removeAttribute(this.parentElement, ariaType);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment