element-plus/packages/components/tooltip-v2/src/trigger.ts
JeremyWuuuuu 12218c8454
feat(components): [tooltip-v2] implement tooltip-v2 (#6849)
- Finish implementing tooltip-v2
2022-03-27 10:55:03 +08:00

21 lines
523 B
TypeScript

import { buildProps, definePropType } from '@element-plus/utils'
import type { ExtractPropTypes } from 'vue'
const EventHandler = {
type: definePropType<(e: Event) => boolean | void>(Function),
} as const
export const tooltipV2TriggerProps = buildProps({
onBlur: EventHandler,
onClick: EventHandler,
onFocus: EventHandler,
onMouseDown: EventHandler,
onMouseEnter: EventHandler,
onMouseLeave: EventHandler,
} as const)
export type TooltipV2TriggerProps = ExtractPropTypes<
typeof tooltipV2TriggerProps
>