UNPKG

@openshift-console/dynamic-plugin-sdk

Version:

Provides core APIs, types and utilities used by dynamic plugins at runtime.

16 lines (15 loc) 845 B
import { ExtensionK8sModel } from '../api/common-types'; import { CodeRef, Extension, ExtensionDeclaration } from '../types'; /** Properties of custom CreateResource component. */ export type CreateResourceComponentProps = { namespace?: string; }; /** This extension allows plugins to provide a custom component (ie wizard or form) for specific resources, which will be rendered, when users try to create a new resource instance. */ export type CreateResource = ExtensionDeclaration<'console.resource/create', { /** The model for which this create resource page will be rendered. */ model: ExtensionK8sModel; /** The component to be rendered when the model matches */ component: CodeRef<React.ComponentType<CreateResourceComponentProps>>; }>; export declare const isCreateResource: (e: Extension) => e is CreateResource;