refactor(core): replace document listeners with pointer capture in slider (#762)

This commit is contained in:
rahim
2026-03-06 13:42:31 -08:00
committed by GitHub
parent 814ba017e4
commit f2f9e6ddc3
9 changed files with 156 additions and 182 deletions
+2 -1
View File
@@ -50,6 +50,7 @@ export const SliderRoot = forwardRef(function SliderRoot(
rootRef,
thumbRef: sliderThumbRef,
rootProps,
rootStyle,
thumbProps,
} = useSlider({
computeState: (input) => {
@@ -89,7 +90,7 @@ export const SliderRoot = forwardRef(function SliderRoot(
state,
stateAttrMap: SliderDataAttrs,
ref: [forwardedRef, rootRef],
props: [{ style: cssVars }, rootProps, elementProps],
props: [{ style: { ...cssVars, ...rootStyle } }, rootProps, elementProps],
}
)}
</SliderProvider>