header.tsx 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import Link from "next/link";
  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. <Link 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. </Link>
  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. <Link href="/">
  43. <span className="font-medium tracking-tight text-lg">
  44. json-render
  45. </span>
  46. </Link>
  47. </div>
  48. <nav className="flex items-center gap-4">
  49. <Link
  50. href="/playground"
  51. className="text-sm text-muted-foreground hover:text-foreground transition-colors"
  52. >
  53. <span className="sm:hidden">Play</span>
  54. <span className="hidden sm:inline">Playground</span>
  55. </Link>
  56. <Link
  57. href="/docs"
  58. className="text-sm text-muted-foreground hover:text-foreground transition-colors"
  59. >
  60. Docs
  61. </Link>
  62. <a
  63. href="https://github.com/vercel-labs/json-render"
  64. target="_blank"
  65. rel="noopener noreferrer"
  66. className="text-sm text-muted-foreground hover:text-foreground transition-colors"
  67. >
  68. GitHub
  69. </a>
  70. <ThemeToggle />
  71. </nav>
  72. </div>
  73. </header>
  74. );
  75. }