@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
tsx 33 lines 1.09 KB
Raw
1 import type { ComponentProps } from "react";
2 import type { ResizableWidthHandlers } from "~/hooks/useResizableWidth";
3 import { cn } from "~/lib/utils";
4
5 interface Props extends Pick<
6 ComponentProps<"div">,
7 "tabIndex" | "onKeyDown" | "aria-valuenow" | "aria-valuemin" | "aria-valuemax"
8 > {
9 handlers: ResizableWidthHandlers;
10 className?: string;
11 label?: string;
12 }
13
14 export function RightPanelResizeHandle({ handlers, className, label, ...separatorProps }: Props) {
15 return (
16 <div
17 role="separator"
18 aria-label={label}
19 aria-orientation="vertical"
20 {...separatorProps}
21 className={cn(
22 "group absolute inset-y-0 left-0 z-40 w-1 cursor-col-resize touch-none select-none any-pointer-coarse:-left-2 any-pointer-coarse:w-4",
23 className,
24 )}
25 {...handlers}
26 >
27 <span
28 aria-hidden
29 className="pointer-events-none absolute inset-y-0 left-0 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover:bg-border group-focus-visible:bg-primary/60 group-active:bg-primary/60 any-pointer-coarse:left-2"
30 />
31 </div>
32 );
33 }