mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 08:50:34 +01:00
14 lines
381 B
TypeScript
14 lines
381 B
TypeScript
import { shallowRef } from 'vue'
|
|
import { modalInjectionKey } from '../composables/useModal'
|
|
import type { ModalState } from '../types/modal'
|
|
import { defineNuxtPlugin } from '#imports'
|
|
|
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
const modalState = shallowRef<ModalState>({
|
|
component: 'div',
|
|
props: {}
|
|
})
|
|
|
|
nuxtApp.vueApp.provide(modalInjectionKey, modalState)
|
|
})
|