Skip to content

Commit

Permalink
Apply minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
nfmohit committed Apr 3, 2024
1 parent da7d9f4 commit d8c8881
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions assets/js/components/NewBadge.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ function NewBadge( {
hasNoSpacing,
onLearnMoreClick = () => {},
} ) {
const BadgeComponent = (
const badgeComponent = (
<Badge
className={ classnames( 'googlesitekit-new-badge', {
'googlesitekit-badge--has-no-spacing': hasNoSpacing,
'googlesitekit-new-badge--has-no-spacing': hasNoSpacing,
} ) }
label={ __( 'New', 'google-site-kit' ) }
hasLeftSpacing={ hasLeftSpacing }
/>
);

if ( ! tooltipTitle ) {
return BadgeComponent;
return badgeComponent;
}

return (
Expand All @@ -80,7 +80,7 @@ function NewBadge( {
interactive
open={ forceOpen }
>
{ BadgeComponent }
{ badgeComponent }
</Tooltip>
);
}
Expand Down
7 changes: 4 additions & 3 deletions assets/sass/components/global/_googlesitekit-new-badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
margin-left: 6px;
padding: 4px 8px;
text-transform: none;

&.googlesitekit-new-badge--has-no-spacing {
margin-left: 0;
}
}

.googlesitekit-new-badge.googlesitekit-badge--has-left-spacing {
margin-left: 12px;
}
.googlesitekit-new-badge.googlesitekit-badge--has-no-spacing {
margin-left: 0;
}

.googlesitekit-tooltip.MuiTooltip-tooltip.googlesitekit-new-badge__tooltip {
border-radius: $br-xs;
Expand Down

0 comments on commit d8c8881

Please sign in to comment.