@prefecthq/prefect-ui-library
Version:
This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.
16 lines (13 loc) • 567 B
text/typescript
import { InjectionKey } from 'vue'
import { Schema } from '@/schemas/types/schema'
import { PrefectKind } from '@/schemas/types/schemaValues'
import { injectFromSelfOrAncestor } from '@/utilities/inject'
export type SchemaFormSettings = {
schema: Schema,
kinds: PrefectKind[],
skipDefaultValueInitialization: boolean,
}
export const schemaFormSettingsInjectionKey: InjectionKey<Readonly<SchemaFormSettings>> = Symbol()
export function useSchemaFormSettings(): Readonly<SchemaFormSettings> {
return injectFromSelfOrAncestor(schemaFormSettingsInjectionKey)
}