diff --git a/landing/components/docs/mdx-components.tsx b/landing/components/docs/mdx-components.tsx index 069dce7344..381917c667 100644 --- a/landing/components/docs/mdx-components.tsx +++ b/landing/components/docs/mdx-components.tsx @@ -3,7 +3,7 @@ import { ExternalLink, Key, Link as LinkIcon } from "lucide-react"; import Link from "next/link"; import type { ReactNode } from "react"; -import { useState } from "react"; +import { startTransition, useState } from "react"; import { Button } from "@/components/ui/button"; import { DynamicCodeBlock } from "@/components/ui/dynamic-code-block"; import type { @@ -128,7 +128,7 @@ function TypeIcon({ type }: { type: string }) { strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" - className={cn(className, "text-emerald-600 dark:text-emerald-500/70")} + className={cn(className, "text-emerald-600")} > @@ -147,7 +147,7 @@ function TypeIcon({ type }: { type: string }) { strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" - className={cn(className, "text-violet-600 dark:text-violet-400/70")} + className={cn(className, "text-violet-600 dark:text-violet-500")} > @@ -165,7 +165,7 @@ function TypeIcon({ type }: { type: string }) { strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" - className={cn(className, "text-sky-600 dark:text-sky-400/70")} + className={cn(className, "text-sky-600")} > @@ -185,7 +185,7 @@ function TypeIcon({ type }: { type: string }) { strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" - className={cn(className, "text-orange-600 dark:text-orange-400/70")} + className={cn(className, "text-orange-500 dark:text-orange-600")} > @@ -281,7 +281,7 @@ function generateSchema( function SchemaCodeBlock({ code, lang }: { code: string; lang: string }) { return ( -
+
); @@ -313,9 +313,9 @@ export function DatabaseTable({ const tableName = name || "table"; return ( -
+
{/* Header */} -
+
@@ -339,17 +339,12 @@ export function DatabaseTable({ {name} ) : ( - + Table )} - {name && ( - - ({fields.length}) - - )}
-
+
{( [ { key: "table", label: "Table" }, @@ -361,15 +356,18 @@ export function DatabaseTable({ ))}
@@ -377,107 +375,109 @@ export function DatabaseTable({ {/* Sub-selector for SQL dialect or Drizzle provider */} {view === "sql" && ( -
+
{sqlDialects.map((d) => ( ))}
)} {view === "drizzle" && ( -
+
{drizzleProviders.map((d) => ( ))}
)} {view === "table" ? ( - <> +
{/* Column headers */} -
-
- Field -
-
- Type -
-
- Key -
-
- Description -
+
+ {["Field", "Type", "Key", "Description"].map((label) => ( +
+ {label} +
+ ))}
{/* Rows */} {fields.map((field) => (
-
+
{field.name}
- + {field.type}
{field.isPrimaryKey && ( - + - pk + PK )} {field.isForeignKey && ( - + - fk + FK )} {field.isOptional && ( - + ? )} {!field.isPrimaryKey && !field.isForeignKey && !field.isOptional && ( - — + - )}
-
+
{field.description}
))} - +
) : (