cb15c5e0d8
Release / Check for new version (push) Has been cancelled
Release / Build macOS ARM64 (push) Has been cancelled
Release / Build macOS x64 (push) Has been cancelled
Release / Build Linux ARM64 (push) Has been cancelled
Release / Build Linux musl ARM64 (push) Has been cancelled
Release / Build Linux musl x64 (push) Has been cancelled
Release / Build Linux x64 (push) Has been cancelled
Release / Build Windows x64 (push) Has been cancelled
Release / Publish to npm (push) Has been cancelled
Release / Publish sandbox package to npm (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
CI / Rust (windows-latest - x86_64-pc-windows-msvc) (push) Has been cancelled
CI / Native E2E Tests (push) Has been cancelled
CI / Windows Integration Test (push) Has been cancelled
CI / Global Install (macos-latest) (push) Has been cancelled
CI / Global Install (ubuntu-latest) (push) Has been cancelled
CI / Version Sync Check (push) Has been cancelled
CI / Rust (push) Has been cancelled
CI / Dashboard (push) Has been cancelled
CI / Sandbox Package (push) Has been cancelled
CI / Rust (macos-latest - aarch64-apple-darwin) (push) Has been cancelled
CI / Rust (macos-latest - x86_64-apple-darwin) (push) Has been cancelled
CI / Global Install (windows-latest) (push) Has been cancelled
51 lines
1.6 KiB
TypeScript
51 lines
1.6 KiB
TypeScript
"use client"
|
|
|
|
import * as ResizablePrimitive from "react-resizable-panels"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
function ResizablePanelGroup({
|
|
className,
|
|
...props
|
|
}: ResizablePrimitive.GroupProps) {
|
|
return (
|
|
<ResizablePrimitive.Group
|
|
data-slot="resizable-panel-group"
|
|
className={cn(
|
|
"flex h-full w-full aria-[orientation=vertical]:flex-col",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
|
|
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
|
|
}
|
|
|
|
function ResizableHandle({
|
|
withHandle,
|
|
className,
|
|
...props
|
|
}: ResizablePrimitive.SeparatorProps & {
|
|
withHandle?: boolean
|
|
}) {
|
|
return (
|
|
<ResizablePrimitive.Separator
|
|
data-slot="resizable-handle"
|
|
className={cn(
|
|
"relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{withHandle && (
|
|
<div className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" />
|
|
)}
|
|
</ResizablePrimitive.Separator>
|
|
)
|
|
}
|
|
|
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
|