From 9d5ebda266b79178328ba273f627cd1ee93c9782 Mon Sep 17 00:00:00 2001 From: Benjamin Michotte Date: Mon, 10 Jun 2024 15:50:39 +0200 Subject: [PATCH] add ignoreThumbOffset option --- packages/react/slider/src/Slider.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react/slider/src/Slider.tsx b/packages/react/slider/src/Slider.tsx index 69bab3511..9f1ee45de 100644 --- a/packages/react/slider/src/Slider.tsx +++ b/packages/react/slider/src/Slider.tsx @@ -547,11 +547,12 @@ type SliderThumbImplElement = React.ElementRef; interface SliderThumbImplProps extends PrimitiveSpanProps { index: number; name?: string; + ignoreThumbOffset?: boolean } const SliderThumbImpl = React.forwardRef( (props: ScopedProps, forwardedRef) => { - const { __scopeSlider, index, name, ...thumbProps } = props; + const { __scopeSlider, index, name, ignoreThumbOffset = false, ...thumbProps } = props; const context = useSliderContext(THUMB_NAME, __scopeSlider); const orientation = useSliderOrientationContext(THUMB_NAME, __scopeSlider); const [thumb, setThumb] = React.useState(null); @@ -565,7 +566,7 @@ const SliderThumbImpl = React.forwardRef