Skip to content

Commit

Permalink
fix: move chevrons to right of the link
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Aug 7, 2020
1 parent ddd6107 commit 91c2854
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
33 changes: 19 additions & 14 deletions src/components/NavigationItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,29 +155,36 @@ const NavItem = ({ page, depthLevel, searchTerm, filteredPageNames }) => {
>
<span className={styles.navLinkText}>
{headerIcon}
{depthLevel > 0 && page.children && (
<FeatherIcon
className={cx(
{ [styles.isExpanded]: isExpanded },
styles.nestedChevron
)}
name="chevron-right"
/>
)}
{display}
</span>
{depthLevel > 0 && page.children && (
<FeatherIcon
className={cx(
{ [styles.isExpanded]: isExpanded },
styles.nestedChevron
)}
name="chevron-right"
/>
)}
{isExternal(page.url) && <FeatherIcon name="external-link" />}
</Link>
) : (
<button
type="button"
<div
role="button"
css={css`
cursor: pointer;
`}
className={cx(styles.navLink, {
[styles.isPartiallyCurrent]: isBreadCrumb,
})}
onClick={() => setToggleIsExpanded(!toggleIsExpanded)}
onKeyPress={() => setToggleIsExpanded(!toggleIsExpanded)}
tabIndex={0}
>
<span className={styles.navLinkText}>
{headerIcon}
{display}
</span>
{depthLevel > 0 && (
<FeatherIcon
className={cx(
Expand All @@ -187,9 +194,7 @@ const NavItem = ({ page, depthLevel, searchTerm, filteredPageNames }) => {
name="chevron-right"
/>
)}
{headerIcon}
{display}
</button>
</div>
)}

{page.children && isExpanded && (
Expand Down
1 change: 0 additions & 1 deletion src/components/NavigationItems.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ button.navLink {
}

.nestedChevron {
margin-right: 0.5rem;
stroke-width: 4;
transition: 0.2s;

Expand Down

0 comments on commit 91c2854

Please sign in to comment.