2022-12-19 20:03:08 +00:00
|
|
|
import styled from 'styled-components'
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
|
|
|
interface ActivePropType {
|
|
|
|
active?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const NavWrap = styled.div`
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
border-bottom: 1px solid ${({ theme }) => theme.colors.primary};
|
|
|
|
`
|
|
|
|
|
|
|
|
export const NavBar = styled.nav`
|
|
|
|
margin-right: 1%;
|
|
|
|
display: flex;
|
|
|
|
flex: 1;
|
|
|
|
padding: 1rem 0;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
`
|
|
|
|
|
|
|
|
export const NavLink = styled(Link) <ActivePropType>`
|
2023-03-16 21:19:17 +00:00
|
|
|
color: ${props => ({ theme }) => props.active ?
|
|
|
|
theme.colors.text ?
|
|
|
|
theme.colors.text : theme.colors.secondary :
|
|
|
|
theme.colors.primary};
|
2022-12-19 20:03:08 +00:00
|
|
|
|
2023-03-16 21:19:17 +00:00
|
|
|
background-color: ${props => ({ theme }) => theme.colors.background};
|
2022-12-19 20:03:08 +00:00
|
|
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
border: 2px solid;
|
|
|
|
|
|
|
|
margin: 0.2rem;
|
|
|
|
border-radius: 5px;
|
|
|
|
display: flex;
|
|
|
|
transition: all 0.1s ease;
|
|
|
|
|
|
|
|
&:hover {
|
2023-03-16 21:19:17 +00:00
|
|
|
color: ${({ theme }) => theme.colors.text ? theme.colors.text : theme.colors.secondary};
|
2022-12-19 20:03:08 +00:00
|
|
|
}
|
|
|
|
`
|