Skip to content

Commit

Permalink
fix(Shield): fix shield spacing without QuestionIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
xmicha82 committed Feb 19, 2025
1 parent f544ca8 commit d04296a
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions packages/components/src/Shield/Shield.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ const Shield: React.FunctionComponent<ShieldProps> = ({
color: attributes.color,
};

const badge = (
<Icon size={size}>
{attributes.title === 'Unknown' ? disableQuestionIcon ? null : <QuestionIcon {...badgeProps} /> : <SecurityIcon {...badgeProps} />}
</Icon>
);
const badge =
attributes.title === 'Unknown' ? (
disableQuestionIcon ? null : (
<Icon size={size}>
<QuestionIcon {...badgeProps} />
</Icon>
)
) : (
<Icon size={size}>
<SecurityIcon {...badgeProps} />
</Icon>
);

const body = (
<span>
Expand Down

0 comments on commit d04296a

Please sign in to comment.