Files
NotionNext/themes/game/components/Header.js
tangly1024.com 4d3b30b495 theme-game
2024-03-19 18:48:14 +08:00

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>
)
}