Fix navLink width

This commit is contained in:
William Tran 2021-05-31 02:45:45 -04:00
parent f3ad802b42
commit be636c5085
2 changed files with 13 additions and 1 deletions

View File

@ -25,6 +25,11 @@
padding: 0.5rem 2rem 0.5rem 0.5rem;
}
.navLinkSelected {
/* smaller to account for marker width */
padding: 0.5rem 1.15rem 0.5rem 0.5rem;
}
.readAll {
font-weight: bold;
}

View File

@ -87,7 +87,14 @@ const Nav = ({ headings, currentIndex, link: Link }: ChildProps) => {
{index === currentIndex && (
<span className={styles.selectedMarker} />
)}
<Link className={styles.navLink} url={heading.url}>
<Link
className={
styles.navLink +
" " +
(index === currentIndex ? styles.navLinkSelected : "")
}
url={heading.url}
>
{heading.title}
</Link>
</div>