Refactor #4211 - For Tooltip

This commit is contained in:
Tuğçe Küçükoğlu 2023-07-31 10:47:30 +03:00
parent 9bc1999429
commit d993b4f6f3
3 changed files with 49 additions and 14 deletions

View file

@ -10,7 +10,14 @@
import { DirectiveBinding, ObjectDirective } from 'vue';
import { DirectiveHooks } from '../basedirective';
export declare type TooltipDirectivePassThroughOptionType = TooltipDirectivePassThroughAttributes | null | undefined;
export declare type TooltipDirectivePassThroughOptionType = TooltipDirectivePassThroughAttributes | ((options: TooltipPassThroughMethodOptions) => TooltipDirectivePassThroughAttributes) | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface TooltipPassThroughMethodOptions {
context: TooltipContext;
}
/**
* Defines options of Tooltip.
@ -96,6 +103,28 @@ export interface TooltipDirectivePassThroughAttributes {
[key: string]: any;
}
/**
* Defines current options in Tooltip directive.
*/
export interface TooltipContext {
/**
* Current top position state as a boolean.
*/
top: boolean;
/**
* Current right position state as a boolean.
*/
right: boolean;
/**
* Current bottom position state as a boolean.
*/
bottom: boolean;
/**
* Current left position state as a boolean.
*/
left: boolean;
}
/**
* Defines modifiers of Tooltip.
*/