@openshift-console/dynamic-plugin-sdk
Version:
Based on the concept of [webpack module federation](https://webpack.js.org/concepts/module-federation/), dynamic plugins are loaded and interpreted from remote sources at runtime. The standard way to deliver and expose dynamic plugins to Console is throug
20 lines (19 loc) • 1 kB
TypeScript
/// <reference types="react" />
import { ExtensionK8sModel } from '../api/common-types';
import { CodeRef, Extension, ExtensionDeclaration } from '../types';
/** Properties of custom CreateResource component. */
export declare type CreateResourceComponentProps = {
namespace?: string;
};
export declare 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<any>) => e is 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<import("react").ComponentType<CreateResourceComponentProps>>;
}>;