MCPcopy Create free account
hub / github.com/code100x/daily-code / ResizableHandle

Function ResizableHandle

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

Source from the content-addressed store, hash-verified

15const ResizablePanel = ResizablePrimitive.Panel;
16
17const ResizableHandle = ({
18 withHandle,
19 className,
20 ...props
21}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
22 withHandle?: boolean;
23}) => (
24 <ResizablePrimitive.PanelResizeHandle
25 className={cn(
26 "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:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 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-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
27 className
28 )}
29 {...props}
30 >
31 {withHandle && (
32 <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
33 <DragHandleDots2Icon className="h-2.5 w-2.5" />
34 </div>
35 )}
36 </ResizablePrimitive.PanelResizeHandle>
37);
38
39export { ResizablePanelGroup, ResizablePanel, ResizableHandle };

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected