From 85111b13cb76162ece34c686cca32b948d950c73 Mon Sep 17 00:00:00 2001 From: Alexandre Alves Date: Wed, 30 Jul 2025 15:31:56 +0100 Subject: [PATCH] add docs for addTab about accessible Vue props + fix minor typo in panels docs (#14968) --- docusaurus/docs/extensions/api/panels.md | 2 +- docusaurus/docs/extensions/api/tabs.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docusaurus/docs/extensions/api/panels.md b/docusaurus/docs/extensions/api/panels.md index 7b6c170c7b..6f80b16952 100644 --- a/docusaurus/docs/extensions/api/panels.md +++ b/docusaurus/docs/extensions/api/panels.md @@ -49,7 +49,7 @@ Usage example for `'PanelLocation.DETAILS_MASTHEAD'`: ```ts plugin.addPanel( - PanelLocation.DETAILS_MASTHEAD + PanelLocation.DETAILS_MASTHEAD, { resource: ['catalog.cattle.io.clusterrepo'] }, { component: () => import('./MastheadDetailsComponent.vue') } ); diff --git a/docusaurus/docs/extensions/api/tabs.md b/docusaurus/docs/extensions/api/tabs.md index 0fbd773dc1..4587f228a4 100644 --- a/docusaurus/docs/extensions/api/tabs.md +++ b/docusaurus/docs/extensions/api/tabs.md @@ -66,4 +66,21 @@ plugin.addTab( component: () => import('./MyTabComponent.vue') } ); +``` + +### TabLocation.RESOURCE_DETAIL accessible props + +When using `addTab` in the `TabLocation.RESOURCE_DETAIL` location, the component used can have access to the given Vue properties: + +- `resource`: This will pass to the component used the **resource** object (k8s resource) which can be useful to access in the component context + +Usage: +```js +props: { + resource: { + type: [String, Object], + default: () => {} + }, + +.... ``` \ No newline at end of file