Skip to content

armgit / pdfcn

Public Imported from GitHub
0

Beautiful pdf components, built on Takumi and Forme. 100% Free, Zero config, one command setup.

fix: update layout to accommodate PDF preview slot in documentation page

Aniket-508404f0226ae3f
diff --git a/apps/web/app/(app)/docs/[[...slug]]/page.tsx b/apps/web/app/(app)/docs/[[...slug]]/page.tsx
index e19694c..b8d3cc2 100644
--- a/apps/web/app/(app)/docs/[[...slug]]/page.tsx
+++ b/apps/web/app/(app)/docs/[[...slug]]/page.tsx
@@ -183,7 +183,7 @@ const Page = async (props: { params: Promise<{ slug?: string[] }> }) => {
) : null}
</div>
<DocsAds slot="content" />
- <div className="w-full flex-1 *:data-[slot=alert]:first:mt-0">
+ <div className="w-full flex-1 *:data-[slot=alert]:first:mt-0 *:data-[slot=pdf-preview]:first:mt-0">
{baseSwitcher && (
<DocsBaseSwitcher {...baseSwitcher} className="mb-4" />
)}
diff --git a/apps/web/components/pdf-preview.tsx b/apps/web/components/pdf-preview.tsx
index 37590e8..829a1d6 100644
--- a/apps/web/components/pdf-preview.tsx
+++ b/apps/web/components/pdf-preview.tsx
@@ -218,6 +218,7 @@ export const PdfPreview = ({
return (
<div
ref={containerRef}
+ data-slot="pdf-preview"
className={cn("overflow-hidden rounded-lg border bg-muted/30", className)}
style={{ minHeight: height }}
>