withApis()
Home > @backstage/core-plugin-api
> withApis
Wrapper for giving component an API context.
Signature:
function withApis<T extends {}>(apis: TypesToApiRefs<T>): <TProps extends T>(WrappedComponent: React.ComponentType<TProps>) => {
(props: React.PropsWithChildren<Omit<TProps, keyof T>>): React.JSX.Element;
displayName: string;
};
Parameters
Parameter |
Type |
Description |
---|---|---|
apis |
APIs for the context. |
<TProps extends T>(WrappedComponent: React.ComponentType<TProps>) => { (props: React.PropsWithChildren<Omit<TProps, keyof T>>): React.JSX.Element; displayName: string; }