e15a0c16b8
Added NavWrap so the ThemeSelector can be placed in a corner
38 lines
843 B
TypeScript
38 lines
843 B
TypeScript
import styled from 'styled-components'
|
|
import Link from 'next/link';
|
|
|
|
interface ActivePropType {
|
|
active?: false | true;
|
|
}
|
|
|
|
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`
|
|
display: flex;
|
|
flex: 1;
|
|
padding: 2rem 0;
|
|
flex-wrap: nowrap;
|
|
justify-content: center;
|
|
align-items: center;
|
|
`
|
|
|
|
export const NavLink = styled(Link)<ActivePropType>`
|
|
color: ${props => props.active ? ({ theme }) => theme.colors.secondary : ({ theme }) => theme.colors.primary};
|
|
margin: 0.2rem;
|
|
border: 1px solid;
|
|
padding: 0.2rem 0.5rem;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
&:hover {
|
|
color: ${({ theme }) => theme.colors.secondary};
|
|
}
|
|
|
|
` |