dialog.ts 467 B

1234567891011121314
  1. import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue'
  2. import type { useNamespace } from '@kankan-components/hooks'
  3. export type DialogContext = {
  4. dialogRef: Ref<HTMLElement | undefined>
  5. headerRef: Ref<HTMLElement | undefined>
  6. bodyId: Ref<string>
  7. ns: ReturnType<typeof useNamespace>
  8. rendered: Ref<boolean>
  9. style: ComputedRef<CSSProperties>
  10. }
  11. export const dialogInjectionKey: InjectionKey<DialogContext> =
  12. Symbol('dialogInjectionKey')