You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Header.tsx 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. 'use client'
  2. import { useState } from 'react'
  3. import { MenuOutlined } from '@ant-design/icons'
  4. import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
  5. import { faBars, faBell } from '@fortawesome/free-solid-svg-icons'
  6. import { Button, Space, Image, Flex, Typography } from 'antd'
  7. import Sidebar from '@/components/layout/Sidebar'
  8. import BellNotification from '@/components/ui/BellNotification'
  9. const { Text, Title } = Typography
  10. const Header = () => {
  11. const [showSideBar, setShowSideBar] = useState(false)
  12. return (
  13. <Flex align='center' className="!px-4 !py-2 !relative !z-40 !bg-white !shadow-sm">
  14. {/* Sidebar Trigger */}
  15. <Button
  16. type="text"
  17. icon={<FontAwesomeIcon icon={faBars} />}
  18. onClick={() => setShowSideBar(true)}
  19. className="text-lg text-gray-700"
  20. />
  21. {/* Sidebar Component */}
  22. <Sidebar open={showSideBar} setOpen={setShowSideBar} />
  23. {/* Logo + Brand */}
  24. <Flex justify='center' className="!ms-3">
  25. <Image
  26. src="/ruccan_logo.png"
  27. alt="Ruccan Logo"
  28. preview={false}
  29. height={24}
  30. />
  31. <Text className="!text-black !font-bold !ms-3">Ruccan.com</Text>
  32. </Flex>
  33. {/* Notification Bell */}
  34. <div className="ms-auto">
  35. <BellNotification />
  36. </div>
  37. </Flex>
  38. )
  39. }
  40. export default Header