File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 11import { readFile } from "node:fs/promises" ;
22import { join } from "node:path" ;
3+ import {
4+ ResizableHandle ,
5+ ResizablePanel ,
6+ ResizablePanelGroup ,
7+ } from "@repo/shadcn-ui/components/ui/resizable" ;
38import { cn } from "@repo/shadcn-ui/lib/utils" ;
49import { DynamicCodeBlock } from "fumadocs-ui/components/dynamic-codeblock" ;
510import { Tab , Tabs } from "fumadocs-ui/components/tabs" ;
@@ -61,8 +66,17 @@ export const Preview = async ({ path, className }: ComponentPreviewProps) => {
6166
6267 return (
6368 < Tabs items = { [ "Preview" , "Code" ] } >
64- < Tab className = { cn ( "not-prose h-[600px] overflow-auto" , className ) } >
65- < Component />
69+ < Tab className = { cn ( "not-prose h-[600px] overflow-auto p-0" , className ) } >
70+ < ResizablePanelGroup direction = "horizontal" >
71+ < ResizablePanel className = "p-4" defaultSize = { 100 } >
72+ < Component />
73+ </ ResizablePanel >
74+ < ResizableHandle
75+ className = "translate-x-px border-none [&>div]:shrink-0"
76+ withHandle
77+ />
78+ < ResizablePanel defaultSize = { 0 } />
79+ </ ResizablePanelGroup >
6680 </ Tab >
6781 < Tab className = "p-0" >
6882 < div className = "h-[600px] [&_.fd-scroll-container]:h-full [&_.fd-scroll-container]:max-h-none" >
You can’t perform that action at this time.
0 commit comments