MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / ResizableHandle

Function ResizableHandle

src/components/ui/resizable.tsx:31–54  ·  view source on GitHub ↗
({
  withHandle,
  className,
  ...props
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
  withHandle?: boolean
})

Source from the content-addressed store, hash-verified

29}
30
31function ResizableHandle({
32 withHandle,
33 className,
34 ...props
35}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
36 withHandle?: boolean
37}) {
38 return (
39 <ResizablePrimitive.PanelResizeHandle
40 data-slot="resizable-handle"
41 className={cn(
42 "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center 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-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
43 className
44 )}
45 {...props}
46 >
47 {withHandle && (
48 <div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
49 <GripVerticalIcon className="size-2.5" />
50 </div>
51 )}
52 </ResizablePrimitive.PanelResizeHandle>
53 )
54}
55
56export { ResizablePanelGroup, ResizablePanel, ResizableHandle }

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected