| 20 | } |
| 21 | |
| 22 | function ResizableHandle({ |
| 23 | withHandle, |
| 24 | className, |
| 25 | ...props |
| 26 | }: ResizablePrimitive.SeparatorProps & { |
| 27 | withHandle?: boolean; |
| 28 | }) { |
| 29 | return ( |
| 30 | <ResizablePrimitive.Separator |
| 31 | data-slot="resizable-handle" |
| 32 | className={cn( |
| 33 | "relative flex w-px items-center justify-center bg-border 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:ring-offset-1 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", |
| 34 | className, |
| 35 | )} |
| 36 | {...props} |
| 37 | > |
| 38 | {withHandle && ( |
| 39 | <div className="z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border"> |
| 40 | <GripVerticalIcon className="size-2.5" /> |
| 41 | </div> |
| 42 | )} |
| 43 | </ResizablePrimitive.Separator> |
| 44 | ); |
| 45 | } |
| 46 | |
| 47 | export { ResizableHandle, ResizablePanel, ResizablePanelGroup }; |