mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #4211 - For Tooltip
This commit is contained in:
parent
9bc1999429
commit
d993b4f6f3
3 changed files with 49 additions and 14 deletions
31
components/lib/tooltip/Tooltip.d.ts
vendored
31
components/lib/tooltip/Tooltip.d.ts
vendored
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue