mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-21 02:50:11 +08:00
f576d5a57b
- Add tooltip-v2 documentation - Complete tooltip-v2 implementation
24 lines
627 B
TypeScript
24 lines
627 B
TypeScript
import type { InjectionKey, Ref } from 'vue'
|
|
import type { useNamespace } from '@element-plus/hooks'
|
|
|
|
export type TooltipV2Context = {
|
|
onClose: () => void
|
|
onDelayOpen: () => void
|
|
onOpen: () => void
|
|
contentId: Ref<string>
|
|
triggerRef: Ref<HTMLElement | null>
|
|
ns: ReturnType<typeof useNamespace>
|
|
}
|
|
|
|
export type TooltipV2ContentContext = {
|
|
arrowRef: Ref<HTMLElement | null>
|
|
}
|
|
|
|
export const tooltipV2RootKey: InjectionKey<TooltipV2Context> =
|
|
Symbol('tooltipV2')
|
|
|
|
export const tooltipV2ContentKey: InjectionKey<TooltipV2ContentContext> =
|
|
Symbol('tooltipV2Content')
|
|
|
|
export const TOOLTIP_V2_OPEN = 'tooltip_v2.open'
|