diff --git a/content/docs/components/navigation/navbar.mdx b/content/docs/components/navigation/navbar.mdx index f3a6a56..2e59ecd 100644 --- a/content/docs/components/navigation/navbar.mdx +++ b/content/docs/components/navigation/navbar.mdx @@ -7,7 +7,7 @@ import { PreviewComponents } from "@/components/docs/preview-components"; import { NavBarDemo } from "@/components/docs/navbar-demo"; import { Tabs, Tab } from "fumadocs-ui/components/tabs"; - + diff --git a/src/components/docs/preview-card.tsx b/src/components/docs/preview-card.tsx index 2d550ba..529308e 100644 --- a/src/components/docs/preview-card.tsx +++ b/src/components/docs/preview-card.tsx @@ -13,6 +13,8 @@ interface PreviewCardProps { registryName: string; /** Skip the centered padding — for components that span the full width, like NavBar. */ fullBleed?: boolean; + /** Additional classes for the stage container. */ + stageClassName?: string; children: ReactNode; } @@ -42,7 +44,12 @@ function openWith(target: "v0" | "lovable" | "bolt", registryName: string) { window.open(url, "_blank", "noopener,noreferrer"); } -export function PreviewCard({ registryName, fullBleed, children }: PreviewCardProps) { +export function PreviewCard({ + registryName, + fullBleed, + stageClassName, + children, +}: PreviewCardProps) { const { theme, dark, setTheme, setDark } = usePreviewPrefs(); const [replayKey, setReplayKey] = useState(0); const [themeOpen, setThemeOpen] = useState(false); @@ -157,9 +164,14 @@ export function PreviewCard({ registryName, fullBleed, children }: PreviewCardPr >
{fullBleed ? ( -
{children}
+
{children}
) : ( -
+
{children}
)} diff --git a/src/components/docs/preview-components.tsx b/src/components/docs/preview-components.tsx index d781066..d3b0a68 100644 --- a/src/components/docs/preview-components.tsx +++ b/src/components/docs/preview-components.tsx @@ -14,6 +14,8 @@ interface PreviewComponentsProps { demo?: string; /** Skip the centered padding around the demo — for full-width components. */ fullBleed?: boolean; + /** Additional classes for the preview stage container. */ + stageClassName?: string; children: React.ReactNode; } @@ -29,6 +31,7 @@ export function PreviewComponents({ registryName, demo, fullBleed, + stageClassName, children, }: PreviewComponentsProps) { const path = demo ?? `components/docs/${registryName}-demo.tsx`; @@ -39,7 +42,11 @@ export function PreviewComponents({ return ( - + {children}