({
isSelected ? 'active' : 'default',
SegmentedControlItemVariants({ size, activeState: isSelected ? activeState : 'default' }),
isSelected && activeClassName,
+ disabled && 'disabled',
)}
- onClick={() => onChange(option.value)}
+ onClick={() => {
+ if (!isSelected)
+ onChange(option.value)
+ }}
+ disabled={disabled}
>
-
+ {Icon && }
{text && (
{text}
@@ -128,7 +134,7 @@ export const SegmentedControl = ({
)}
{!isLast && !isSelected && !isNextSelected && (
-