Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Bug fixes

- Fixed right padding styling issue with the `Tag` component and remove right padding on a removable `Tag` ([#2860](https://github.com/Shopify/polaris-react/pull/2860)).
- Fixed secondary navigation spacing when no icon is present ([#2874](https://github.com/Shopify/polaris-react/pull/2874)).

### Documentation

Expand Down
4 changes: 4 additions & 0 deletions src/components/Navigation/Navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ $secondary-item-font-size: rem(15px);
}
}

.SecondaryNavigation-noIcon {
margin-left: spacing();
}

// Section styles
.Section {
@include unstyled-list;
Expand Down
7 changes: 6 additions & 1 deletion src/components/Navigation/components/Item/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ export function Item({
({url: firstUrl}, {url: secondUrl}) => secondUrl.length - firstUrl.length,
)[0];

const SecondaryNavigationClassName = classNames(
styles.SecondaryNavigation,
!icon && styles['SecondaryNavigation-noIcon'],
);

secondaryNavigationMarkup = (
<div className={styles.SecondaryNavigation}>
<div className={SecondaryNavigationClassName}>
<Secondary expanded={showExpanded}>
{subNavigationItems.map((item) => {
const {label, ...rest} = item;
Expand Down