Skip to content

Commit 287bca4

Browse files
ankur-archclaude
andcommitted
Getting started: lucide icons everywhere, admonition title fix, mobile wrap for prompts
- Replace every Font Awesome icon in the getting-started components with lucide equivalents: fa-sparkles is not in the loaded FA set, which left the default AgentPrompt tile and the hero badge with empty boxes. The badge, tab icons, copy/check, chevrons, and arrows now render from lucide-react like the rest of the page's icons. - orm/index: move the "Prisma 7 Connection Requirements" heading out of the callout body into the :::note[...] title, so the icon aligns with the title line and the h3 no longer leaks into the TOC. - AgentPrompt expanded body wraps like the hero prompt ([&_pre]:w-full + pre-wrap) instead of a 2000px-wide horizontal scroll on mobile. - Verified at 390px: no horizontal overflow with the disclosure open and prompts expanded; header rows wrap cleanly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent b232dac commit 287bca4

2 files changed

Lines changed: 50 additions & 36 deletions

File tree

apps/docs/content/docs/orm/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,8 @@ const user = await prisma.user.create({
177177
},
178178
});
179179
```
180-
:::note
180+
:::note[Prisma 7 Connection Requirements]
181181

182-
### Prisma 7 Connection Requirements
183182
Starting with **Prisma 7**, providing a [driver adapter](/orm/core-concepts/supported-databases/database-drivers) is mandatory for direct database connections. This change standardizes database connectivity across Node.js, Serverless, and Edge environments.
184183

185184
If you use Prisma Accelerate, instantiate Prisma Client with `accelerateUrl` and the Accelerate extension instead of a driver adapter.

apps/docs/src/components/getting-started.tsx

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
"use client";
22
import { type ReactNode, useRef, useState } from "react";
3-
import { ArrowUpDown } from "lucide-react";
3+
import {
4+
ArrowRight,
5+
ArrowUpDown,
6+
Check,
7+
ChevronDown,
8+
ChevronUp,
9+
Copy,
10+
Sparkles,
11+
Terminal,
12+
} from "lucide-react";
413
import posthog from "posthog-js";
514
import { useCopyButton } from "fumadocs-ui/utils/use-copy-button";
615
import { buttonVariants } from "@prisma-docs/ui/components/button";
@@ -66,16 +75,16 @@ export function AgentPrompt({
6675
className="flex size-9 shrink-0 items-center justify-center rounded-lg border bg-fd-background text-fd-primary [&_svg]:size-4"
6776
aria-hidden="true"
6877
>
69-
{icon ?? <i className="fa-regular fa-sparkles text-[0.8rem]" />}
78+
{icon ?? <Sparkles />}
7079
</span>
7180
<span className="grow text-sm font-medium">{title}</span>
7281
{guideHref && (
7382
<a
7483
href={withDocsBasePath(guideHref)}
75-
className="text-sm font-medium text-fd-primary hover:underline"
84+
className="inline-flex items-center gap-1.5 text-sm font-medium text-fd-primary hover:underline"
7685
>
77-
{guideTitle}{" "}
78-
<i className="fa-regular fa-arrow-right text-[0.7rem]" aria-hidden="true" />
86+
{guideTitle}
87+
<ArrowRight className="size-3.5" aria-hidden="true" />
7988
</a>
8089
)}
8190
<button
@@ -85,26 +94,33 @@ export function AgentPrompt({
8594
onClick={() => setOpen((v) => !v)}
8695
aria-expanded={open}
8796
>
88-
<i
89-
className={cn("fa-regular text-[0.7rem]", open ? "fa-chevron-up" : "fa-chevron-down")}
90-
aria-hidden="true"
91-
/>
97+
{open ? (
98+
<ChevronUp className="size-3.5" aria-hidden="true" />
99+
) : (
100+
<ChevronDown className="size-3.5" aria-hidden="true" />
101+
)}
92102
{open ? "Hide" : "View"}
93103
</button>
94104
<button
95105
className={cn(buttonVariants({ color: "primary", size: "sm", className: "gap-2" }))}
96106
onClick={onCopy}
97107
>
98-
<i
99-
className={cn("fa-regular text-[0.8rem]", checked ? "fa-check" : "fa-copy")}
100-
aria-hidden="true"
101-
/>
108+
{checked ? (
109+
<Check className="size-3.5" aria-hidden="true" />
110+
) : (
111+
<Copy className="size-3.5" aria-hidden="true" />
112+
)}
102113
Copy prompt
103114
</button>
104115
</div>
105116
<div
106117
ref={bodyRef}
107-
className={cn("border-t px-3 pb-1 [&_pre]:text-[0.8rem]", !open && "sr-only")}
118+
className={cn(
119+
// w-full beats the fumadocs pre's w-max so pre-wrap can take effect,
120+
// matching the hero prompt; prompts read as prose, not code.
121+
"border-t px-3 pb-1 [&_pre]:w-full [&_pre]:whitespace-pre-wrap [&_pre]:text-[0.8rem]",
122+
!open && "sr-only",
123+
)}
108124
>
109125
{children}
110126
</div>
@@ -128,39 +144,40 @@ export function GetStartedTabs({ cli, children }: { cli: string; children: React
128144
posthog.capture("docs:copy_prompt", { page_path: window.location.pathname, tab });
129145
});
130146

131-
const tabButton = (value: "prompt" | "cli", icon: string, label: string) => (
147+
const tabButton = (value: "prompt" | "cli", icon: ReactNode, label: string) => (
132148
<button
133149
role="tab"
134150
aria-selected={tab === value}
135151
onClick={() => setTab(value)}
136152
className={cn(
137-
"inline-flex items-center gap-2 border-b-2 px-1 pb-2.5 pt-0.5 text-sm font-medium transition-colors",
153+
"inline-flex items-center gap-2 border-b-2 px-1 pb-2.5 pt-0.5 text-sm font-medium transition-colors [&_svg]:size-4",
138154
tab === value
139155
? "border-fd-primary text-fd-foreground"
140156
: "border-transparent text-fd-muted-foreground hover:text-fd-foreground",
141157
)}
142158
>
143-
<i className={cn("fa-regular", icon, "text-[0.8rem]")} aria-hidden="true" />
159+
{icon}
144160
{label}
145161
</button>
146162
);
147163

148164
return (
149165
<div className="not-prose my-6 rounded-xl border bg-fd-card shadow-sm">
150166
<div className="flex items-center gap-5 px-5 pt-3.5" role="tablist">
151-
{tabButton("prompt", "fa-sparkles", "AI Prompt")}
152-
{tabButton("cli", "fa-terminal", "CLI")}
167+
{tabButton("prompt", <Sparkles aria-hidden="true" />, "AI Prompt")}
168+
{tabButton("cli", <Terminal aria-hidden="true" />, "CLI")}
153169
<button
154170
className={cn(
155171
buttonVariants({ color: "secondary", size: "sm", className: "ms-auto mb-1.5 gap-2" }),
156172
)}
157173
onClick={onCopy}
158174
aria-label="Copy to clipboard"
159175
>
160-
<i
161-
className={cn("fa-regular text-[0.8rem]", checked ? "fa-check" : "fa-copy")}
162-
aria-hidden="true"
163-
/>
176+
{checked ? (
177+
<Check className="size-3.5" aria-hidden="true" />
178+
) : (
179+
<Copy className="size-3.5" aria-hidden="true" />
180+
)}
164181
Copy
165182
</button>
166183
</div>
@@ -227,13 +244,11 @@ export function GetStartedTabs({ cli, children }: { cli: string; children: React
227244
: "One prompt scaffolds, seeds, migrates, and deploys the whole stack. Copy it, or read it first."}
228245
</span>
229246
<span className="inline-flex shrink-0 items-center gap-1.5 font-medium text-fd-primary">
230-
<i
231-
className={cn(
232-
"fa-regular text-[0.7rem]",
233-
expanded ? "fa-chevron-up" : "fa-chevron-down",
234-
)}
235-
aria-hidden="true"
236-
/>
247+
{expanded ? (
248+
<ChevronUp className="size-3.5" aria-hidden="true" />
249+
) : (
250+
<ChevronDown className="size-3.5" aria-hidden="true" />
251+
)}
237252
{expanded ? "Hide prompt" : "View prompt"}
238253
</span>
239254
</button>
@@ -421,7 +436,7 @@ export function HeroPitch({
421436
<div className="flex flex-col items-start gap-5">
422437
{badge && (
423438
<span className="inline-flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-fd-primary">
424-
<i className="fa-regular fa-sparkles text-[0.7rem]" aria-hidden="true" />
439+
<Sparkles className="size-3.5" aria-hidden="true" />
425440
{badge}
426441
</span>
427442
)}
@@ -434,7 +449,7 @@ export function HeroPitch({
434449
className={cn(buttonVariants({ color: "primary", className: "gap-2" }))}
435450
>
436451
{primaryLabel}
437-
<i className="fa-regular fa-arrow-right text-[0.8rem]" aria-hidden="true" />
452+
<ArrowRight className="size-4" aria-hidden="true" />
438453
</a>
439454
{secondaryHref && secondaryLabel && (
440455
<a
@@ -479,8 +494,8 @@ export function StackLayer({
479494
<span className="block text-sm font-semibold text-fd-foreground">{title}</span>
480495
<span className="block text-xs text-fd-muted-foreground">{children}</span>
481496
</span>
482-
<i
483-
className="fa-regular fa-arrow-right ms-auto text-[0.75rem] text-fd-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
497+
<ArrowRight
498+
className="ms-auto size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
484499
aria-hidden="true"
485500
/>
486501
</a>

0 commit comments

Comments
 (0)