mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-25 07:26:49 +00:00
27 lines
655 B
JavaScript
27 lines
655 B
JavaScript
import { useGlobal } from '@/lib/global'
|
|
import Image from 'next/image'
|
|
import Logo from './Logo'
|
|
|
|
/**
|
|
* 顶栏
|
|
* @returns
|
|
*/
|
|
export default function Header() {
|
|
const { setSideBarVisible } = useGlobal()
|
|
return (
|
|
<header className='z-20'>
|
|
<div className='w-full h-16 rounded-md bg-white shadow-card dark:bg-[#1F2030] flex justify-between items-center px-4'>
|
|
<Logo />
|
|
|
|
<button
|
|
className='flex xl:hidden'
|
|
onClick={() => {
|
|
setSideBarVisible(true)
|
|
}}>
|
|
<Image src='/svg/search.svg' className='mr-2' width={20} height={20} />
|
|
</button>
|
|
</div>
|
|
</header>
|
|
)
|
|
}
|