4
0
forked from crowetic/commerce

Dropdown NavBar

This commit is contained in:
Belen Curcio
2020-10-21 16:41:53 -03:00
parent 5bbe5d21b0
commit df6c9070e5
4 changed files with 81 additions and 56 deletions

View File

@@ -3,14 +3,14 @@ import { FC } from 'react'
import Link from 'next/link'
import { useTheme } from 'next-themes'
import { Logo } from '@components/ui'
import { Searchbar, Toggle, UserNav } from '@components/core'
import { Searchbar, UserNav } from '@components/core'
interface Props {
className?: string
}
const Navbar: FC<Props> = ({ className }) => {
const rootClassName = className
const { theme, setTheme } = useTheme()
return (
<div className={rootClassName}>
<div className="flex justify-between align-center flex-row py-4 md:py-6 relative">
@@ -38,12 +38,6 @@ const Navbar: FC<Props> = ({ className }) => {
</div>
<div className="flex flex-1 justify-end space-x-8">
<Toggle
checked={theme === 'dark'}
onChange={() =>
theme === 'dark' ? setTheme('light') : setTheme('dark')
}
/>
<UserNav />
</div>
</div>