mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
more docs
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
a5c3c3c874
commit
c34fe074f6
@ -234,3 +234,25 @@ export default class ExampleExtension extends LensRendererExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Kubernetes Object Details
|
||||||
|
|
||||||
|
An extension can register custom details (content) for specified Kubernetes kinds/apiVersions.
|
||||||
|
|
||||||
|
``` typescript
|
||||||
|
import React from "react"
|
||||||
|
import { LensRendererExtension } from "@k8slens/extensions";
|
||||||
|
import { CustomKindDetails, CustomKindDetailsProps } from "./src/custom-kind-details"
|
||||||
|
|
||||||
|
export default class ExampleExtension extends LensRendererExtension {
|
||||||
|
kubeObjectMenuItems = [
|
||||||
|
{
|
||||||
|
kind: "CustomKind",
|
||||||
|
apiVersions: ["custom.acme.org/v1"],
|
||||||
|
components: {
|
||||||
|
Details: (props: CustomKindDetailsProps) => <CustomKindDetails {...props} />
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user