Skip to content

Commit a57d916

Browse files
* Name of the thumb (low / high) is passed to renderThumb function
1 parent 28403ef commit a57d916

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface SliderProps extends ViewProps {
3434
max: number;
3535
minRange?: number;
3636
step: number;
37-
renderThumb: () => ReactNode;
37+
renderThumb: (name: 'high' | 'low') => ReactNode;
3838
low?: number;
3939
high?: number;
4040
allowLabelOverflow?: boolean;
@@ -180,8 +180,8 @@ const Slider: React.FC<SliderProps> = ({
180180
isPressed,
181181
allowLabelOverflow,
182182
);
183-
const lowThumb = renderThumb();
184-
const highThumb = renderThumb();
183+
const lowThumb = renderThumb('low');
184+
const highThumb = renderThumb('high');
185185

186186
const labelContainerProps = useLabelContainerProps(floatingLabel);
187187

0 commit comments

Comments
 (0)