Skip to content

Commit

Permalink
fix: slider: ensure tooltip is visually hidden when slider is disabled (
Browse files Browse the repository at this point in the history
  • Loading branch information
dkilgore-eightfold committed Jun 23, 2023
1 parent 565581b commit b810ba8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,9 @@ export const Slider: FC<SliderProps> = React.forwardRef(
styles.sliderTooltip,
tooltipProps?.classNames,
])}
wrapperClassNames={
mergedDisabled ? styles.hideSliderTooltip : ''
}
closeOnReferenceClick={false}
content={getTooltipContentByValue(val)}
key={`value-tooltip-${index}`}
Expand Down
5 changes: 5 additions & 0 deletions src/components/Slider/slider.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ $small-min-label-offset-with-steps: 0;
&-tooltip {
min-width: max-content;
}

.hide-slider-tooltip {
opacity: 0;
visibility: hidden;
}
}

.rail-marker-segments {
Expand Down

0 comments on commit b810ba8

Please sign in to comment.