Skip to content

Commit 3f1c835

Browse files
committed
feat: Use PF Labels in Workspace details
Signed-off-by: Charles Thao <[email protected]>
1 parent 10fac2e commit 3f1c835

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

workspaces/frontend/src/app/pages/Workspaces/Details/WorkspaceDetailsOverview.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
DescriptionListDescription,
77
} from '@patternfly/react-core/dist/esm/components/DescriptionList';
88
import { Divider } from '@patternfly/react-core/dist/esm/components/Divider';
9+
import { Label } from '@patternfly/react-core/dist/esm/components/Label';
910
import { WorkspacesWorkspace } from '~/generated/data-contracts';
1011

1112
type WorkspaceDetailsOverviewProps = {
@@ -29,9 +30,11 @@ export const WorkspaceDetailsOverview: React.FunctionComponent<WorkspaceDetailsO
2930
<DescriptionListGroup>
3031
<DescriptionListTerm>Labels</DescriptionListTerm>
3132
<DescriptionListDescription>
32-
{Object.entries(workspace.podTemplate.podMetadata.labels)
33-
.map(([key, value]) => `${key}=${value}`)
34-
.join(', ')}
33+
{Object.entries(workspace.podTemplate.podMetadata.labels).map(([key, value]) => (
34+
<Label key={key} style={{ margin: '0.10rem' }}>
35+
{key}={value}
36+
</Label>
37+
))}
3538
</DescriptionListDescription>
3639
</DescriptionListGroup>
3740
<Divider />

0 commit comments

Comments
 (0)