您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Header.tsx 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. 'use client'
  2. import { useState } from 'react'
  3. import { MenuOutlined } from '@ant-design/icons'
  4. import { Button, Space } from 'antd'
  5. import Sidebar from '@/components/layout/Sidebar'
  6. import BellNotification from '@/components/ui/BellNotification'
  7. const Header = () => {
  8. const [showSideBar, setShowSideBar] = useState(false)
  9. return (
  10. <header className="flex items-center px-4 py-2 relative z-40 bg-white shadow-sm">
  11. {/* Sidebar Trigger */}
  12. <Button
  13. type="text"
  14. icon={<MenuOutlined />}
  15. onClick={() => setShowSideBar(true)}
  16. className="text-lg text-gray-700"
  17. />
  18. {/* Sidebar Component */}
  19. <Sidebar open={showSideBar} setOpen={setShowSideBar} />
  20. {/* Logo + Brand */}
  21. <div className="flex items-center ms-3">
  22. <img src="/ruccan_logo.png" alt="Ruccan Logo" className="h-8 w-auto" />
  23. <span className="text-black font-bold text-lg ms-3">Ruccan.com</span>
  24. </div>
  25. {/* Notification Bell */}
  26. <div className="ms-auto">
  27. <BellNotification />
  28. </div>
  29. </header>
  30. )
  31. }
  32. export default Header