mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-18 05:58:07 +01:00
feat(Slideover): open programmatically (#122)
This commit is contained in:
12
src/runtime/plugins/slideover.ts
Normal file
12
src/runtime/plugins/slideover.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { shallowRef } from 'vue'
|
||||
import { defineNuxtPlugin } from '#imports'
|
||||
import { slideoverInjectionKey, type SlideoverState } from '../composables/useSlideover'
|
||||
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
const slideoverState = shallowRef<SlideoverState>({
|
||||
component: 'div',
|
||||
props: {}
|
||||
})
|
||||
|
||||
nuxtApp.vueApp.provide(slideoverInjectionKey, slideoverState)
|
||||
})
|
||||
Reference in New Issue
Block a user