Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions apps/platform/app/(docs)/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ type ResolvedDocsPageData = {
dependencies?: string[];
};

const DEFAULT_APP_STORE_HREF =
"https://apps.apple.com/app/expo-go/id982107779";
const DEFAULT_PLAY_STORE_HREF =
"https://play.google.com/store/apps/details?id=host.exp.exponent";

export function generateStaticParams() {
return docsSource.generateParams();
}
Expand Down Expand Up @@ -134,6 +139,9 @@ export default async function DocsPage({
}

const pager = getComponentPager(componentSlug);
const qrValue = pageData.qrValue ?? `showcase://components/${componentSlug}`;
const appStoreHref = pageData.appStoreHref ?? DEFAULT_APP_STORE_HREF;
const playStoreHref = pageData.playStoreHref ?? DEFAULT_PLAY_STORE_HREF;

return (
<MotionDiv
Expand Down Expand Up @@ -174,9 +182,7 @@ export default async function DocsPage({
</section>

<section className="mb-6 min-w-0 space-y-4">
{pageData.qrValue &&
pageData.appStoreHref &&
pageData.playStoreHref ? (
{qrValue ? (
<div className="flex justify-start sm:justify-end">
<Popover>
<PopoverTrigger asChild>
Expand All @@ -186,9 +192,9 @@ export default async function DocsPage({
</PopoverTrigger>
<PopoverContent>
<PreviewCard
qrValue={pageData.qrValue}
appStoreHref={pageData.appStoreHref}
playStoreHref={pageData.playStoreHref}
qrValue={qrValue}
appStoreHref={appStoreHref}
playStoreHref={playStoreHref}
/>
</PopoverContent>
</Popover>
Expand Down
68 changes: 36 additions & 32 deletions apps/platform/components/showcase/docs-primitives.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export function ApiTable({
}>;
}) {
return (
<GlassContainer variant="strong" className="w-full rounded-3xl p-0.5">
<div className="border-border/70 bg-card/86 w-full max-w-full overflow-x-auto rounded-[calc(1.5rem-2px)] border">
<table className="w-full min-w-[40rem] text-left text-sm">
<GlassContainer variant="strong" className="w-full rounded-[20px] p-0.5">
<div className="border-border/70 bg-card/86 w-full max-w-full overflow-x-auto rounded-[18px] border">
<table className="w-full min-w-160 text-left text-sm">
<thead className="bg-muted/54 text-foreground">
<tr>
<th className="px-4 py-3 font-medium">prop</th>
Expand Down Expand Up @@ -170,40 +170,44 @@ export function DocsPager({
next?: { href: string; title: string; description: string };
}) {
return (
<div className="grid gap-4 sm:grid-cols-2">
<div className="grid gap-4 sm:grid-cols-2 lg:px-4">
{previous ? (
<Link
href={previous.href}
className="group border-border/50 bg-card hover:bg-muted/50 flex items-center gap-3 rounded-xl border p-3 transition-colors"
>
<ChevronLeft className="text-muted-foreground group-hover:text-foreground size-4 transition-colors" />
<div className="flex flex-col gap-0.5">
<span className="text-muted-foreground text-[10px] font-medium uppercase tracking-wider">
Previous
</span>
<span className="text-foreground text-sm font-medium">
{previous.title}
</span>
</div>
</Link>
<GlassContainer variant="default">
<Link
href={previous.href}
className="group hover:bg-muted/50 bg-card/50 flex items-center gap-4 rounded-[18px] border border-neutral-400/20 p-4 transition-colors"
>
<ChevronLeft className="text-muted-foreground group-hover:text-foreground size-4 transition-colors" />
<div className="flex flex-col gap-0.5">
<span className="text-muted-foreground text-[10px] font-medium tracking-wider uppercase">
Previous
</span>
<span className="text-foreground text-sm font-medium">
{previous.title}
</span>
</div>
</Link>
</GlassContainer>
) : (
<div />
)}
{next ? (
<Link
href={next.href}
className="group border-border/50 bg-card hover:bg-muted/50 flex items-center justify-end gap-3 rounded-xl border p-3 text-right transition-colors"
>
<div className="flex flex-col gap-0.5">
<span className="text-muted-foreground text-[10px] font-medium uppercase tracking-wider">
Next
</span>
<span className="text-foreground text-sm font-medium">
{next.title}
</span>
</div>
<ChevronRight className="text-muted-foreground group-hover:text-foreground size-4 transition-colors" />
</Link>
<GlassContainer variant="default">
<Link
href={next.href}
className="group hover:bg-muted/50 bg-card/50 flex items-center justify-end gap-4 rounded-[18px] border border-neutral-400/20 p-4 text-right transition-colors"
>
<div className="flex flex-col gap-0.5">
<span className="text-muted-foreground text-[10px] font-medium tracking-wider uppercase">
Next
</span>
<span className="text-foreground text-sm font-medium">
{next.title}
</span>
</div>
<ChevronRight className="text-muted-foreground group-hover:text-foreground size-4 transition-colors" />
</Link>
</GlassContainer>
) : null}
</div>
);
Expand Down
Loading
Loading