header.tsx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { Lifebuoy } from "@phosphor-icons/react/dist/ssr/Lifebuoy";
  2. import { AppTabs } from "@pythnetwork/component-library/AppTabs";
  3. import { Button, ButtonLink } from "@pythnetwork/component-library/Button";
  4. import { Link } from "@pythnetwork/component-library/Link";
  5. import clsx from "clsx";
  6. import type { ComponentProps } from "react";
  7. import styles from "./header.module.scss";
  8. import Logo from "./logo.svg";
  9. import { SearchButton } from "./search-button";
  10. import { ThemeSwitch } from "./theme-switch";
  11. export const Header = ({ className, ...props }: ComponentProps<"header">) => (
  12. <header className={clsx(styles.header, className)} {...props}>
  13. <div className={styles.content}>
  14. <div className={styles.leftMenu}>
  15. <Link href="/" className={styles.logoLink ?? ""}>
  16. <div className={styles.logoWrapper}>
  17. <Logo className={styles.logo} />
  18. </div>
  19. <div className={styles.logoLabel}>Pyth Homepage</div>
  20. </Link>
  21. <div className={styles.appName}>Insights</div>
  22. <AppTabs
  23. tabs={[
  24. { href: "/", id: "/", children: "Overview" },
  25. { href: "/publishers", id: "/publishers", children: "Publishers" },
  26. {
  27. href: "/price-feeds",
  28. id: "/price-feeds",
  29. children: "Price Feeds",
  30. },
  31. ]}
  32. />
  33. </div>
  34. <div className={styles.rightMenu}>
  35. <Button beforeIcon={Lifebuoy} variant="ghost" size="sm" rounded>
  36. Support
  37. </Button>
  38. <SearchButton />
  39. <ButtonLink
  40. href="https://docs.pyth.network"
  41. size="sm"
  42. rounded
  43. target="_blank"
  44. >
  45. Dev Docs
  46. </ButtonLink>
  47. <ThemeSwitch className={styles.themeSwitch ?? ""} />
  48. </div>
  49. </div>
  50. </header>
  51. );