Improve ProjectSource display for configMap and secret

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-03-23 08:54:42 -04:00
1 parent 98d1868430
commit 6672987cd9
1 file changed
+15 -3
@@ -25,7 +25,11 @@ export const Projected: VolumeVariantComponent<"projected"> = (
</DrawerItem>
<DrawerItem name="Items">
<ul>
{secret.items?.map(({ key }) => <li key={key}>{key}</li>)}
{secret.items?.map(({ key, path }) => (
<li key={key}>
{key} ⇢ {path}
</li>
))}
</ul>
</DrawerItem>
</>
@@ -35,7 +39,11 @@ export const Projected: VolumeVariantComponent<"projected"> = (
<DrawerTitle size="sub-title">Downward API</DrawerTitle>
<DrawerItem name="Items">
<ul>
{downwardAPI.items?.map(({ path }) => <li key={path}>{path}</li>)}
{downwardAPI.items?.map(({ path }) => (
<li key={path}>
{path}
</li>
))}
</ul>
</DrawerItem>
</>
@@ -48,7 +56,11 @@ export const Projected: VolumeVariantComponent<"projected"> = (
</DrawerItem>
<DrawerItem name="Items">
<ul>
{configMap.items?.map(({ path }) => <li key={path}>{path}</li>)}
{configMap.items?.map(({ key, path }) => (
<li key={key}>
{key} ⇢ {path}
</li>
))}
</ul>
</DrawerItem>
</>