mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
This pull request standardizes the usage of props and value types for the `ResizablePanelGroup` and `ResizablePanel` components across multiple files in the codebase. Specifically, it replaces the deprecated `direction` prop with `orientation`, and updates numeric prop values (such as `defaultSize`, `minSize`, and `maxSize`) to be passed as strings. This ensures consistency with the updated component API and improves type safety. **Component API Updates:** * Replaced the `direction` prop with `orientation` for all usages of `ResizablePanelGroup` * Updated all `ResizablePanel` props (`defaultSize`, `minSize`, `maxSize`) to be passed as strings instead of numbers, ensuring compatibility with the latest API requirements. * Removed deprecated or unnecessary props such as `order` from `ResizablePanel` components, and ensured all size-related props are consistently formatted as strings.
23 lines
717 B
TypeScript
23 lines
717 B
TypeScript
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from 'ui'
|
|
|
|
export default function ResizableDemo() {
|
|
return (
|
|
<ResizablePanelGroup
|
|
orientation="vertical"
|
|
className="min-h-[200px] max-w-md 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>
|
|
)
|
|
}
|