@@ -62,7 +62,6 @@ export const SegmentedControl = ({
6262 >
6363 { /* Segments rendered with dynamic left/right edges based on hover */ }
6464 { processedSegments . map ( ( seg , idx ) => {
65- const isClickable = ! ! onSegmentClick && ! segments [ idx ] . disabled
6665 const leftOfHovered = idx <= hoveredIndex
6766 const rightOfHovered = idx >= hoveredIndex
6867
@@ -77,12 +76,10 @@ export const SegmentedControl = ({
7776 ) : null }
7877
7978 < box
80- onMouseDown = { ( ) => isClickable && onSegmentClick ( seg . id ) }
79+ onMouseDown = { ( ) => onSegmentClick && onSegmentClick ( seg . id ) }
8180 onMouseOver = { ( ) => {
82- if ( isClickable ) {
83- setHoveredId ( seg . id )
84- setHasHoveredSinceOpen ( true )
85- }
81+ setHoveredId ( seg . id )
82+ setHasHoveredSinceOpen ( true )
8683 } }
8784 style = { {
8885 flexDirection : 'column' ,
@@ -150,7 +147,7 @@ export const processSegments = (
150147 const defaultHL = ! ! seg . defaultHighlighted
151148
152149 // Hover and highlight state
153- const canHover = ! isDisabled && ( ! isSelected || defaultHL )
150+ const canHover = ! isSelected || defaultHL
154151 const isHovered = hoveredId === seg . id && canHover
155152 const isDefaultHighlighted = defaultHL && ! hasHoveredSinceOpen
156153 const isHighlighted = isHovered || isDefaultHighlighted
@@ -159,7 +156,7 @@ export const processSegments = (
159156 const isBold = ! ! ( seg . isBold || isHovered || ( isSelected && isHighlighted ) )
160157
161158 // Colors
162- const frameColor = ! isDisabled && isHighlighted ? theme . foreground : theme . border
159+ const frameColor = isHighlighted ? theme . foreground : theme . border
163160 const textMuted = isDisabled || ( isSelected && ! isHighlighted )
164161 const textColor = textMuted ? theme . muted : theme . foreground
165162
0 commit comments