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 | TypesToApiRefs<T> | APIs for the context. |
Returns:
<TProps extends T>(WrappedComponent: React.ComponentType<TProps>) => { (props: React.PropsWithChildren<Omit<TProps, keyof T>>): React.JSX.Element; displayName: string; }