This commit is contained in:
2025-05-24 01:47:40 +09:00
commit 09d97cbb0b
1594 changed files with 184634 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import type { InjectionKey } from 'vue'
import type { SideblockLayoutContext } from './sideblock.types'
export const injectionKey = Symbol('sideblock-layout') as InjectionKey<SideblockLayoutContext>
export function useSideblockLayoutContext() {
const context = inject(injectionKey)
if (!context) {
throw new Error('useSideblockLayoutContext() is called outside of <SideblockLayout> tree.')
}
return context
}