@@ -51,21 +51,39 @@ Create a themed divider component using shadcn's `cn` utility:
5151import { cn } from ' @/lib/utils' ;
5252import type { DividerProps } from ' react-split-pane' ;
5353
54- function ThemedDivider({ direction , isDragging , disabled , ... props }: DividerProps ) {
54+ function ThemedDivider(props : DividerProps ) {
55+ const {
56+ direction,
57+ isDragging,
58+ disabled,
59+ onMouseDown,
60+ onTouchStart,
61+ onTouchEnd,
62+ onKeyDown,
63+ } = props ;
64+
5565 return (
5666 <div
57- { ... props }
67+ role = " separator"
68+ aria-orientation = { direction === ' horizontal' ? ' vertical' : ' horizontal' }
69+ tabIndex = { disabled ? - 1 : 0 }
70+ onMouseDown = { disabled ? undefined : onMouseDown }
71+ onTouchStart = { disabled ? undefined : onTouchStart }
72+ onTouchEnd = { disabled ? undefined : onTouchEnd }
73+ onKeyDown = { disabled ? undefined : onKeyDown }
5874 className = { cn (
59- ' shrink-0 flex items-center justify-center transition-colors' ,
75+ ' flex items-center justify-center transition-colors' ,
6076 ' bg-border hover:bg-accent focus:outline-none focus:ring-2 focus:ring-ring' ,
6177 direction === ' horizontal'
6278 ? ' w-1 cursor-col-resize'
6379 : ' h-1 cursor-row-resize' ,
64- isDragging && ' bg-primary ' ,
65- disabled && ' cursor-not-allowed opacity-50'
80+ isDragging && ' bg-default-200/50 ' ,
81+ disabled && ' cursor-not-allowed opacity-50' ,
6682 )}
67- />
68- );
83+ >
84+
85+ </div >
86+ )
6987}
7088
7189<SplitPane divider = { ThemedDivider } >
0 commit comments