tokens.ts 421 B

12345678910111213
  1. import type { ComputedRef, InjectionKey, Ref } from 'vue'
  2. export type ElDropdownInjectionContext = {
  3. contentRef: Ref<HTMLElement | null>
  4. role: ComputedRef<string>
  5. triggerId: ComputedRef<string>
  6. isUsingKeyboard: Ref<boolean>
  7. onItemLeave: (e: PointerEvent) => void
  8. onItemEnter: (e: PointerEvent) => void
  9. }
  10. export const DROPDOWN_INJECTION_KEY: InjectionKey<ElDropdownInjectionContext> =
  11. Symbol('elDropdown')