Skip to content

Commit

Permalink
* Name of the thumb (low / high) is passed to renderThumb function
Browse files Browse the repository at this point in the history
  • Loading branch information
githuboftigran committed Sep 15, 2022
1 parent 28403ef commit a57d916
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface SliderProps extends ViewProps {
max: number;
minRange?: number;
step: number;
renderThumb: () => ReactNode;
renderThumb: (name: 'high' | 'low') => ReactNode;
low?: number;
high?: number;
allowLabelOverflow?: boolean;
Expand Down Expand Up @@ -180,8 +180,8 @@ const Slider: React.FC<SliderProps> = ({
isPressed,
allowLabelOverflow,
);
const lowThumb = renderThumb();
const highThumb = renderThumb();
const lowThumb = renderThumb('low');
const highThumb = renderThumb('high');

const labelContainerProps = useLabelContainerProps(floatingLabel);

Expand Down

0 comments on commit a57d916

Please sign in to comment.