@@ -207,7 +207,6 @@ const ScrollBar = React.forwardRef<ScrollBarRef, ScrollBarProps>((props, ref) =>
207
207
const containerStyle : React . CSSProperties = {
208
208
position : 'absolute' ,
209
209
visibility : visible && canScroll ? null : 'hidden' ,
210
- ...style ,
211
210
} ;
212
211
213
212
const thumbStyle : React . CSSProperties = {
@@ -216,7 +215,6 @@ const ScrollBar = React.forwardRef<ScrollBarRef, ScrollBarProps>((props, ref) =>
216
215
borderRadius : 99 ,
217
216
cursor : 'pointer' ,
218
217
userSelect : 'none' ,
219
- ...propsThumbStyle ,
220
218
} ;
221
219
222
220
if ( horizontal ) {
@@ -261,7 +259,7 @@ const ScrollBar = React.forwardRef<ScrollBarRef, ScrollBarProps>((props, ref) =>
261
259
[ `${ scrollbarPrefixCls } -vertical` ] : ! horizontal ,
262
260
[ `${ scrollbarPrefixCls } -visible` ] : visible ,
263
261
} ) }
264
- style = { containerStyle }
262
+ style = { { ... containerStyle , ... style } }
265
263
onMouseDown = { onContainerMouseDown }
266
264
onMouseMove = { delayHidden }
267
265
>
@@ -270,7 +268,7 @@ const ScrollBar = React.forwardRef<ScrollBarRef, ScrollBarProps>((props, ref) =>
270
268
className = { classNames ( `${ scrollbarPrefixCls } -thumb` , {
271
269
[ `${ scrollbarPrefixCls } -thumb-moving` ] : dragging ,
272
270
} ) }
273
- style = { thumbStyle }
271
+ style = { { ... thumbStyle , ... propsThumbStyle } }
274
272
onMouseDown = { onThumbMouseDown }
275
273
/>
276
274
</ div >
0 commit comments