* refactor: tabbed modal to use NewModal * refactor: use DI for instance settings modal instead of passing down props * pnpm prepr
15 lines
426 B
TypeScript
15 lines
426 B
TypeScript
import { createContext } from '@modrinth/ui'
|
|
import type { Ref } from 'vue'
|
|
|
|
import type { GameInstance } from '@/helpers/types'
|
|
|
|
export interface InstanceSettingsContext {
|
|
instance: GameInstance
|
|
offline?: boolean
|
|
isMinecraftServer: Ref<boolean>
|
|
onUnlinked: () => void
|
|
}
|
|
|
|
export const [injectInstanceSettings, provideInstanceSettings] =
|
|
createContext<InstanceSettingsContext>('InstanceSettingsModal', 'instanceSettings')
|