funkwhale/front/src/injection-keys.ts

16 lines
465 B
TypeScript

import type { InjectionKey, Ref } from "vue"
export const TABS_INJECTION_KEY = Symbol('tabs') as InjectionKey<{
tabs: string[]
icons: (string|undefined)[]
currentTab: Ref<string>
}>
export interface PopoverContext {
items: Ref<number>
hoveredItem: Ref<number>
}
export const POPOVER_INJECTION_KEY = Symbol('popover') as InjectionKey<Ref<boolean>[]>
export const POPOVER_CONTEXT_INJECTION_KEY = Symbol('popover context') as InjectionKey<PopoverContext>