Files
qwen-code/packages/web-shell/client/components/ui/resizable.tsx
T
ytahdnand钉萁 df5470e430 feat(web-shell): Add workspace file browser and previews (#13878)
* feat(web-shell): Add workspace file browser and previews

* fix(web-shell): Restore source preview CI fixtures and notices

* fix(web-shell): Address file pane review blockers

* fix(web-shell): Resolve review regressions and strengthen file checks

---------

Co-authored-by: 钉萁 <[email protected]>
2026-10-13 09:38:47 +00:00

47 lines
1.4 KiB
TypeScript

import { forwardRef } from 'react';
import * as ResizablePrimitive from 'react-resizable-panels';
import { cn } from '../../lib/utils';
const ResizablePanelGroup = forwardRef<
HTMLDivElement,
Omit<ResizablePrimitive.GroupProps, 'elementRef'>
>(({ className, ...props }, ref) => (
<ResizablePrimitive.Group
data-slot="resizable-panel-group"
className={cn('flex h-full w-full', className)}
{...props}
elementRef={ref}
/>
));
ResizablePanelGroup.displayName = 'ResizablePanelGroup';
const ResizablePanel = forwardRef<
HTMLDivElement,
Omit<ResizablePrimitive.PanelProps, 'elementRef'>
>((props, ref) => (
<ResizablePrimitive.Panel
data-slot="resizable-panel"
{...props}
elementRef={ref}
/>
));
ResizablePanel.displayName = 'ResizablePanel';
const ResizableHandle = forwardRef<
HTMLDivElement,
Omit<ResizablePrimitive.SeparatorProps, 'elementRef'>
>(({ className, ...props }, ref) => (
<ResizablePrimitive.Separator
data-slot="resizable-handle"
className={cn(
'relative w-px shrink-0 bg-border focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full',
className,
)}
{...props}
elementRef={ref}
/>
));
ResizableHandle.displayName = 'ResizableHandle';
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };