Fix top-bar extension render errors (#3049)

* fix top-bar extension render errors

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2021-06-14 11:50:52 +03:00
1 parent a320516963
commit 80f66f0569
4 files changed
+33 -5

No files matched your search

@@ -219,6 +219,34 @@ export default class ExampleExtension extends Renderer.LensExtension {
```
### Top Bar Items
This extension can register custom components to a top bar area.
```typescript
import React from "react";
import { Renderer } from "@k8slens/extensions";
const {
Component: {
Icon,
}
} = Renderer;
export default class ExampleExtension extends Renderer.LensExtension {
topBarItems = [
{
components: {
Item: (
<Icon material="favorite" onClick={() => this.navigate("/example-page" />
)
}
}
]
}
```
### Status Bar Items
This extension can register custom icons and text to a status bar area.