MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / ResizeHandle

Function ResizeHandle

ui/src/components/PageSidebarLayout.tsx:215–241  ·  view source on GitHub ↗
({
  width,
  maxWidth,
  onPointerDown,
}: {
  width: number
  maxWidth: number
  onPointerDown: (event: ReactPointerEvent<HTMLDivElement>) => void
})

Source from the content-addressed store, hash-verified

213}
214
215function ResizeHandle({
216 width,
217 maxWidth,
218 onPointerDown,
219}: {
220 width: number
221 maxWidth: number
222 onPointerDown: (event: ReactPointerEvent<HTMLDivElement>) => void
223}) {
224 return (
225 <div
226 role="separator"
227 aria-orientation="vertical"
228 aria-valuemin={MIN_WIDTH}
229 aria-valuemax={maxWidth}
230 aria-valuenow={width}
231 tabIndex={0}
232 onPointerDown={onPointerDown}
233 className="group relative z-10 w-2.5 shrink-0 cursor-col-resize touch-none select-none bg-transparent"
234 >
235 <span
236 aria-hidden
237 className="pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-border/80 transition-colors group-hover:bg-accent/50 group-active:bg-accent/70"
238 />
239 </div>
240 )
241}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected