diff --git a/components/common/Navbar/DesktopNavMenu.module.css b/components/common/Navbar/DesktopNavMenu.module.css new file mode 100644 index 000000000..5ec6a3098 --- /dev/null +++ b/components/common/Navbar/DesktopNavMenu.module.css @@ -0,0 +1,11 @@ +.navMenu { + @apply hidden ml-6 space-x-4 lg:block; +} + +.link { + @apply items-center transition ease-in-out duration-75 cursor-pointer text-accent-0 border-b-2 border-opacity-0; +} + +.link:hover { + @apply border-b-2 border-opacity-40; +} diff --git a/components/common/Navbar/DesktopNavMenu.tsx b/components/common/Navbar/DesktopNavMenu.tsx new file mode 100644 index 000000000..8b62d808a --- /dev/null +++ b/components/common/Navbar/DesktopNavMenu.tsx @@ -0,0 +1,28 @@ +import { FC, } from 'react' +import s from './DesktopNavMenu.module.css' +import Link from 'next/link' + +interface Link { + href: string + label: string +} +interface DesktopNavMenuProps { + links?: Link[] +} + +const DesktopNavMenu: FC = ({ links }) => { + return ( + + ) +} + +export default DesktopNavMenu diff --git a/components/common/Navbar/MenuButton.module.css b/components/common/Navbar/MenuButton.module.css index ba8c18605..ac59c612b 100644 --- a/components/common/Navbar/MenuButton.module.css +++ b/components/common/Navbar/MenuButton.module.css @@ -3,6 +3,7 @@ height: 30px; margin: 0 auto; width: 30px; + @apply lg:hidden; } .menuButton::after, diff --git a/components/common/Navbar/MenuButton.tsx b/components/common/Navbar/MenuButton.tsx index 0de8f0ade..4379a4e08 100644 --- a/components/common/Navbar/MenuButton.tsx +++ b/components/common/Navbar/MenuButton.tsx @@ -1,5 +1,4 @@ import { FC } from 'react' -import PropTypes from 'prop-types' import s from './MenuButton.module.css' import cn from 'classnames' @@ -17,9 +16,4 @@ const MenuButton: FC = ({ isOpen, onClick }) => { ) } -MenuButton.propTypes = { - isOpen: PropTypes.bool.isRequired, - onClick: PropTypes.func.isRequired, -} - export default MenuButton diff --git a/components/common/Navbar/Navbar.module.css b/components/common/Navbar/Navbar.module.css index 1149d9ceb..433222767 100644 --- a/components/common/Navbar/Navbar.module.css +++ b/components/common/Navbar/Navbar.module.css @@ -15,18 +15,6 @@ padding: 10px 0; } -.navMenu { - @apply hidden ml-6 space-x-4 lg:block; -} - -.link { - @apply items-center transition ease-in-out duration-75 cursor-pointer text-accent-0 border-b-2 border-opacity-0; -} - -.link:hover { - @apply border-b-2 border-opacity-40; -} - .logo { @apply cursor-pointer; } diff --git a/components/common/Navbar/Navbar.tsx b/components/common/Navbar/Navbar.tsx index 492af69b4..4f3b0de1e 100644 --- a/components/common/Navbar/Navbar.tsx +++ b/components/common/Navbar/Navbar.tsx @@ -3,6 +3,7 @@ import Link from 'next/link' import s from './Navbar.module.css' import NavbarRoot from './NavbarRoot' import MenuButton from './MenuButton' +import DesktopNavMenu from './DesktopNavMenu' import { Logo, Container } from '@components/ui' import { Searchbar, UserNav } from '@components/common' @@ -27,16 +28,7 @@ const Navbar: FC = ({ links }) => { - +