Skip to content

Commit 35703bd

Browse files
authored
docs: Add Margelo "Let's talk" widget (#3768)
1 parent ac00232 commit 35703bd

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

docs/src/app/(content)/api/[[...slug]]/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from 'fumadocs-ui/layouts/docs/page'
88
import type { Metadata } from 'next'
99
import { notFound } from 'next/navigation'
10+
import { LetsTalkWidget } from '@/components/lets-talk-widget'
1011
import { PlatformPills } from '@/components/platform/pills'
1112
import { getApiCodeTypeLinks } from '@/lib/api-code-links'
1213
import { createApiRelativeLink } from '@/lib/api-relative-link'
@@ -94,7 +95,11 @@ export default async function Page(props: PageProps<'/api/[[...slug]]'>) {
9495
const currentTypeName = page.slugs[2]
9596

9697
return (
97-
<DocsPage toc={toc} full={page.data.full}>
98+
<DocsPage
99+
toc={toc}
100+
full={page.data.full}
101+
tableOfContent={{ footer: <LetsTalkWidget /> }}
102+
>
98103
<DocsTitle className="m-0 text-4xl md:text-5xl tracking-tight break-words [overflow-wrap:anywhere]">
99104
{page.data.title}
100105
</DocsTitle>

docs/src/app/(content)/docs/[[...slug]]/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import { createRelativeLink } from 'fumadocs-ui/mdx'
88
import type { Metadata } from 'next'
99
import { notFound } from 'next/navigation'
10+
import { LetsTalkWidget } from '@/components/lets-talk-widget'
1011
import { LLMCopyButton, ViewOptions } from '@/components/page-actions'
1112
import { PlatformPills } from '@/components/platform/pills'
1213
import { readPlatformsFromPageData } from '@/lib/platforms'
@@ -29,7 +30,11 @@ export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
2930
const githubUrl = getGithubContentUrl('docs', page.path)
3031

3132
return (
32-
<DocsPage toc={page.data.toc} full={page.data.full}>
33+
<DocsPage
34+
toc={page.data.toc}
35+
full={page.data.full}
36+
tableOfContent={{ footer: <LetsTalkWidget /> }}
37+
>
3338
<DocsTitle>{page.data.title}</DocsTitle>
3439
<PlatformPills platforms={platforms} />
3540
<DocsDescription className="mb-2">
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ArrowRight } from 'lucide-react'
2+
3+
export function LetsTalkWidget() {
4+
return (
5+
<aside className="mt-6 rounded-lg border bg-fd-card p-4 text-sm">
6+
<p className="font-semibold text-fd-foreground">
7+
Building something ambitious?
8+
</p>
9+
<p className="mt-1 text-fd-muted-foreground">
10+
We help teams ship world-class React Native apps.
11+
</p>
12+
<a
13+
href="https://margelo.com"
14+
target="_blank"
15+
rel="noreferrer noopener"
16+
className="mt-4 inline-flex w-full items-center justify-center gap-2 rounded-md bg-fd-primary px-3 py-2 font-medium text-fd-primary-foreground transition-colors hover:bg-fd-primary/80"
17+
>
18+
Let's talk
19+
<ArrowRight className="size-4" />
20+
</a>
21+
</aside>
22+
)
23+
}

0 commit comments

Comments
 (0)