useMainLayoutContainer.ts 437 B

12345678910111213141516
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { type ComputedRef, type InjectionKey, inject } from 'vue'
  3. /*
  4. * Injection key for the main content container in LayoutMain
  5. * */
  6. export const MAIN_LAYOUT_KEY = Symbol('main-content-container') as InjectionKey<
  7. ComputedRef<HTMLElement | undefined>
  8. >
  9. export const useMainLayoutContainer = () => {
  10. return {
  11. node: inject(MAIN_LAYOUT_KEY),
  12. }
  13. }