Skip to content

Commit

Permalink
Merge pull request #2896 from jschuler/icon-spacing
Browse files Browse the repository at this point in the history
Remove unnecessary icon margins if no icon present
  • Loading branch information
Hyperkid123 authored Jul 19, 2024
2 parents a545c27 + a6dde4b commit 5ab9ad3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
8 changes: 5 additions & 3 deletions src/components/Navigation/ChromeNavGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ const ChromeNavGroup = ({ navItems, isHidden, icon, title }: ChromeNavGroupProps

const groupTitle = (
<div>
<Icon size="sm" className="pf-v5-u-mr-sm" isInline>
{icon && sectionTitleMapper[icon]}
</Icon>
{icon && (
<Icon size="sm" className="pf-v5-u-mr-sm" isInline>
{sectionTitleMapper[icon]}
</Icon>
)}
{title}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ exports[`ChromeNavGroup should render nav item group 1`] = `
id="Foo"
>
<div>
<span
class="pf-v5-c-icon pf-m-inline pf-m-sm pf-v5-u-mr-sm"
>
<span
class="pf-v5-c-icon__content"
/>
</span>
Foo
</div>
</h2>
Expand Down Expand Up @@ -85,13 +78,6 @@ exports[`ChromeNavGroup should render nav item group with items 1`] = `
id="Foo"
>
<div>
<span
class="pf-v5-c-icon pf-m-inline pf-m-sm pf-v5-u-mr-sm"
>
<span
class="pf-v5-c-icon__content"
/>
</span>
Foo
</div>
</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ exports[`ChromeNavItemFactory should render chrome group nav item 1`] = `
id="group"
>
<div>
<span
class="pf-v5-c-icon pf-m-inline pf-m-sm pf-v5-u-mr-sm"
>
<span
class="pf-v5-c-icon__content"
/>
</span>
group
</div>
</h2>
Expand Down

0 comments on commit 5ab9ad3

Please sign in to comment.