Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti committed Jan 2, 2024
1 parent 67a03fe commit 9af6d2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/meteor/client/components/GenericCard/GenericCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ export const GenericCard: React.FC<GenericCardProps> = ({ title, body, buttons,
const cardId = useUniqueId();
const descriptionId = useUniqueId();

const iconType = {
[type || 'neutral']: true,
const iconType = type && {
[type]: true,
};

return (
<Card role='region' aria-labelledby={cardId} aria-describedby={descriptionId} {...props}>
<CardHeader>
{icon && <FramedIcon icon={icon} {...iconType} />}
{icon && <FramedIcon icon={icon} {...(type && iconType)} />}
<CardTitle id={cardId}>{title}</CardTitle>
</CardHeader>
<CardBody id={descriptionId}>{body}</CardBody>
Expand Down

0 comments on commit 9af6d2a

Please sign in to comment.