useViewTransition.ts 442 B

123456789101112131415161718
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { ref } from 'vue'
  3. import { ViewTransitions } from './types.ts'
  4. const viewTransition = ref<ViewTransitions>(ViewTransitions.Replace)
  5. export const useViewTransition = () => {
  6. const setViewTransition = (newViewTransition: ViewTransitions) => {
  7. viewTransition.value = newViewTransition
  8. }
  9. return {
  10. setViewTransition,
  11. viewTransition,
  12. }
  13. }