mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-27 22:54:18 +00:00
- Update component API: PanelGroup → Group, PanelResizeHandle → Separator - Update prop: direction → orientation - Update size values: number → string with units (e.g., "50%") - Update CSS selectors: data-[panel-group-direction] → aria-[orientation] - Update controlled component: onLayout → onLayoutChange with Layout type Closes #9118, #9136, #9200
27 lines
748 B
TypeScript
27 lines
748 B
TypeScript
import {
|
|
ResizableHandle,
|
|
ResizablePanel,
|
|
ResizablePanelGroup,
|
|
} from "@/examples/base/ui/resizable"
|
|
|
|
export function ResizableVertical() {
|
|
return (
|
|
<ResizablePanelGroup
|
|
orientation="vertical"
|
|
className="min-h-[200px] max-w-sm rounded-lg border"
|
|
>
|
|
<ResizablePanel defaultSize="25%">
|
|
<div className="flex h-full items-center justify-center p-6">
|
|
<span className="font-semibold">Header</span>
|
|
</div>
|
|
</ResizablePanel>
|
|
<ResizableHandle />
|
|
<ResizablePanel defaultSize="75%">
|
|
<div className="flex h-full items-center justify-center p-6">
|
|
<span className="font-semibold">Content</span>
|
|
</div>
|
|
</ResizablePanel>
|
|
</ResizablePanelGroup>
|
|
)
|
|
}
|