UNPKG

@openshift-console/dynamic-plugin-sdk

Version:

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

11 lines (10 loc) 495 B
import { Provider } from 'react'; import { Extension, ExtensionDeclaration, CodeRef } from '../types'; /** Adds new React context provider to Console application root. */ export type ContextProvider<T = any> = ExtensionDeclaration<'console.context-provider', { /** Context Provider component. */ provider: CodeRef<Provider<T>>; /** Hook for the Context value. */ useValueHook: CodeRef<() => T>; }>; export declare const isContextProvider: (e: Extension) => e is ContextProvider;