main-site/components/styles/navbar.tsx

41 lines
942 B
TypeScript
Raw Normal View History

2022-12-15 20:23:11 +00:00
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};
`
2022-12-15 20:23:11 +00:00
export const NavBar = styled.nav`
margin-right: 1%;
2022-12-15 20:23:11 +00:00
display: flex;
flex: 1;
2022-12-17 01:17:54 +00:00
padding: 1rem 0;
2022-12-15 20:23:11 +00:00
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;
2022-12-17 00:56:41 +00:00
border-radius: 5px;
2022-12-15 20:23:11 +00:00
padding: 0.2rem 0.5rem;
display: flex;
justify-content: center;
align-items: center;
transition: color 0.15s ease, border-color 0.15s ease;
2022-12-15 20:23:11 +00:00
&:hover {
color: ${({ theme }) => theme.colors.secondary};
}
`