Skip to content

Commit

Permalink
change onClick event binding to NavCategory
Browse files Browse the repository at this point in the history
  • Loading branch information
heyjul3s committed Jan 14, 2021
1 parent 93446d6 commit 62e0776
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
17 changes: 8 additions & 9 deletions docs/components/Nav/Mobile/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ export function Navbar() {
const Icon = Icons[`${links[key].name}Icon`];

return (
<NavCategory key={`${key}-button`}>
<NavCategory
key={`${key}-button`}
onClick={onClickNavCategory(
links[key].name,
links[key].mobileNavIndex
)}
>
{!!Icon && <Icon />}
<NavCategoryButton
onClick={onClickNavCategory(
links[key].name,
links[key].mobileNavIndex
)}
>
{links[key].name}
</NavCategoryButton>
<NavCategoryButton>{links[key].name}</NavCategoryButton>
</NavCategory>
);
})}
Expand Down
3 changes: 2 additions & 1 deletion docs/components/Nav/Mobile/Navbar/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const NavMenuContainer = styled.div`
`}
`;

export const NavCategoryButton = styled.button`
export const NavCategoryButton = styled.a`
font-size: 0.6rem;
border: none;
outline: none;
Expand All @@ -37,4 +37,5 @@ export const NavCategory = styled.div`
flex-direction: column;
justify-content: center;
align-items: center;
cursor: pointer;
`;

0 comments on commit 62e0776

Please sign in to comment.