Skip to content

Commit

Permalink
fix: bigger nav icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Aug 17, 2020
1 parent 56a79c0 commit fed7b96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions src/components/NavigationItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,17 @@ const NavigationItems = ({

const NavIcon = ({ page }) => {
if (page.displayName === 'Collect data') {
return <CollectDataIcon className={styles.headerIcon} />;
return (
<CollectDataIcon className={styles.headerIcon} size="var(--icon-size)" />
);
}

if (iconLibrary[page.displayName]) {
return (
<NewRelicIcon
className={styles.headerIcon}
name={iconLibrary[page.displayName]}
size="var(--icon-size)"
/>
);
}
Expand Down Expand Up @@ -132,7 +135,11 @@ const NavItem = ({ page, depthLevel, searchTerm, filteredPageNames }) => {
data-depth={depthLevel}
className={cx({ [styles.filterOn]: filteredPageNames })}
css={css`
padding-left: ${depthLevel === 0 ? '0' : 'calc(0.5rem + 1em)'};
--icon-size: 1.5rem;
padding-left: ${depthLevel === 0
? '0'
: 'calc(0.5rem + var(--icon-size))'};
${depthLevel === 0 &&
css`
Expand Down
4 changes: 2 additions & 2 deletions src/components/NavigationItems.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
transition: 0.2s ease-out;
padding: 0.5rem;
margin: 0 -0.5rem;
margin-left: calc((0.5rem + 1em) * -1);
margin-left: calc((0.5rem + var(--icon-size)) * -1);
border-radius: 0.25rem;
padding-left: calc(0.5rem + 1em);
padding-left: calc(0.5rem + var(--icon-size));

&:hover {
color: var(--primary-text-hover-color);
Expand Down

0 comments on commit fed7b96

Please sign in to comment.