Skip to content

Commit

Permalink
fix: add statusText props in cardDecision to have proper text in chips
Browse files Browse the repository at this point in the history
  • Loading branch information
oyo authored Oct 21, 2024
2 parents 7f75bf4 + 5682156 commit 986b2bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/content/Cards/CardDecision.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ const items = [
provider: 'Bayerische Motorenwerke AG',
name: 'Logistics Network, Material Traceability (LBN-MT)',
status: StatusVariants.release,
statusText: 'Released',
},
{
appId: '123',
provider: 'Catena-X',
name: 'DTC-Translator',
status: StatusVariants.active,
statusText: 'Active',
},
]

Expand Down
6 changes: 5 additions & 1 deletion src/components/content/Cards/CardDecision.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface AppContent {
name?: string
provider: string
status: StatusVariants
statusText?: string
id?: string
title?: string
}
Expand Down Expand Up @@ -135,7 +136,10 @@ export const CardDecision = ({
sx={{ marginBottom: '10px' }}
className="cx-card__decision--chip"
>
<CardChip status={item.status} statusText={item.status} />
<CardChip
status={item.status}
statusText={item.statusText ?? item.status}
/>
</Box>
{(item.status?.toLowerCase() as StatusVariants) !==
StatusVariants.active && (
Expand Down

0 comments on commit 986b2bf

Please sign in to comment.