header.tsx 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. "use client";
  2. import { ThemeToggle } from "./theme-toggle";
  3. export function Header() {
  4. return (
  5. <header className="sticky top-0 z-50 bg-background">
  6. <div className="flex h-14 items-center justify-between px-4 gap-6">
  7. <div className="flex items-center gap-2">
  8. <a href="https://vercel.com" title="Made with love by Vercel">
  9. <svg
  10. data-testid="geist-icon"
  11. height="18"
  12. strokeLinejoin="round"
  13. viewBox="0 0 16 16"
  14. width="18"
  15. style={{ color: "currentcolor" }}
  16. >
  17. <path
  18. fillRule="evenodd"
  19. clipRule="evenodd"
  20. d="M8 1L16 15H0L8 1Z"
  21. fill="currentColor"
  22. ></path>
  23. </svg>
  24. </a>
  25. <span className="text-(--ds-gray-500)">
  26. <svg
  27. data-testid="geist-icon"
  28. height="16"
  29. strokeLinejoin="round"
  30. viewBox="0 0 16 16"
  31. width="16"
  32. style={{ color: "currentcolor" }}
  33. >
  34. <path
  35. fillRule="evenodd"
  36. clipRule="evenodd"
  37. d="M4.01526 15.3939L4.3107 14.7046L10.3107 0.704556L10.6061 0.0151978L11.9849 0.606077L11.6894 1.29544L5.68942 15.2954L5.39398 15.9848L4.01526 15.3939Z"
  38. fill="currentColor"
  39. ></path>
  40. </svg>
  41. </span>
  42. <span className="font-medium tracking-tight text-lg">
  43. Dashboard Example
  44. </span>
  45. </div>
  46. <nav className="flex items-center gap-4">
  47. <a
  48. href="https://json-render.dev"
  49. target="_blank"
  50. rel="noopener noreferrer"
  51. className="text-sm text-muted-foreground hover:text-foreground transition-colors"
  52. >
  53. Docs
  54. </a>
  55. <a
  56. href="https://github.com/vercel-labs/json-render"
  57. target="_blank"
  58. rel="noopener noreferrer"
  59. className="flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors"
  60. >
  61. <svg
  62. viewBox="0 0 16 16"
  63. className="h-4 w-4"
  64. fill="currentColor"
  65. aria-hidden="true"
  66. >
  67. <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" />
  68. </svg>
  69. <span className="hidden sm:inline">GitHub</span>
  70. </a>
  71. <ThemeToggle />
  72. </nav>
  73. </div>
  74. </header>
  75. );
  76. }