Fix review comments

Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
AmbrishRamachandiran
2026-03-04 19:19:57 +05:30
parent 6676b0e137
commit e62d94387f
@@ -144,28 +144,30 @@ export const RangeSlider = forwardRef<HTMLDivElement, RangeSliderProps>(
{...rest}
ref={ref}
>
<div className={clsx(classNames.header, styles[classNames.header])}>
<FieldLabel
label={label}
secondaryLabel={secondaryLabelText}
description={description}
/>
{showValueLabel && (
<SliderOutput
className={clsx(classNames.output, styles[classNames.output])}
>
{({ state }) => {
const values = state.values;
if (values.length === 2) {
return `${formatValue(values[0])} - ${formatValue(
values[1],
)}`;
}
return formatValue(values[0]);
}}
</SliderOutput>
)}
</div>
{(label || showValueLabel) && (
<div className={clsx(classNames.header, styles[classNames.header])}>
<FieldLabel
label={label}
secondaryLabel={secondaryLabelText}
description={description}
/>
{showValueLabel && (
<SliderOutput
className={clsx(classNames.output, styles[classNames.output])}
>
{({ state }) => {
const values = state.values;
if (values.length === 2) {
return `${formatValue(values[0])} - ${formatValue(
values[1],
)}`;
}
return formatValue(values[0]);
}}
</SliderOutput>
)}
</div>
)}
<SliderTrack
className={clsx(classNames.track, styles[classNames.track])}
>