element-plus/packages/tokens/dialog.ts
opengraphica 9c51dab123
feat(components): [dialog] a11y and focus trap on dialog components (#7550)
* feat(components): [dialog] a11y and focus trap on dialog components

* feat(components): [dialog] remove default browser focus style

* feat(components): [dialog] clean up async and comment
2022-05-10 17:58:18 +08:00

15 lines
462 B
TypeScript

import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue'
import type { useNamespace } from '@element-plus/hooks'
export type DialogContext = {
dialogRef: Ref<HTMLElement | undefined>
headerRef: Ref<HTMLElement | undefined>
bodyId: Ref<string>
ns: ReturnType<typeof useNamespace>
rendered: Ref<boolean>
style: ComputedRef<CSSProperties>
}
export const dialogInjectionKey: InjectionKey<DialogContext> =
Symbol('dialogInjectionKey')