Skip to content

Commit

Permalink
Merge pull request #2171 from xmicha82/shield-spacing
Browse files Browse the repository at this point in the history
fix(Shield): fix Shield spacing without QuestionIcon
  • Loading branch information
johnsonm325 authored Feb 19, 2025
2 parents f544ca8 + d04296a commit a625dec
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 a625dec

Please sign in to comment.