Skip to content

Commit

Permalink
feat: link in stay light on active (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
WALLE-AXIOM authored Oct 3, 2024
1 parent 66a439d commit 47aefbb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/TopBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ const List = styled.div`
}
}
a.current {
background-color: ${({ theme }) => theme.primary.light};
}
transition: max-width 0.1s ease-in-out, margin-left 0.1s ease-in-out, opacity 0.5s ease-in-out;
max-width: 100%;
opacity: 1;
Expand Down Expand Up @@ -133,6 +137,7 @@ const TopBar = ({
React.cloneElement(link, {
key: link.to,
onClick: e => toggleMenu(),
className: window.location.pathname === link.props.to && "current",
children: link.props.children.toUpperCase()
})
:
Expand Down

0 comments on commit 47aefbb

Please sign in to comment.