Skip to content

Commit

Permalink
Fix console errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta committed Dec 20, 2024
1 parent 3baeb4f commit 5601445
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions projects/js-packages/components/components/threats-modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,18 @@ export default function ThreatsModal( {
return (
<Modal
title={
isBulk ? (
<Text variant="title-small">{ __( 'Fix all threats', 'jetpack-components' ) }</Text>
) : (
<div className={ styles.threat__title }>
<Text variant="title-small">{ getLabel( firstThreat ) }</Text>
{ !! firstThreat.severity && <ThreatSeverityBadge severity={ firstThreat.severity } /> }
</div>
)
<Text className={ styles.threat__title }>
{ isBulk ? (
__( 'Fix all threats', 'jetpack-components' )
) : (
<>
{ getLabel( firstThreat ) }
{ !! firstThreat.severity && (
<ThreatSeverityBadge severity={ firstThreat.severity } />
) }
</>
) }
</Text>
}
size="large"
{ ...modalProps }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
align-items: center;
gap: calc( var( --spacing-base) * 2 ); // 16px
flex-wrap: wrap;
font-size: 20px;
}

.threat__details {
Expand All @@ -24,7 +24,7 @@
display: flex;
justify-content: space-between;
align-items: center;
height: 112px;
min-height: 120px;
cursor: pointer;

&:first-of-type {
Expand Down

0 comments on commit 5601445

Please sign in to comment.