@@ -59,13 +59,13 @@ class ScrollBar extends React.Component {
5959 }
6060
6161 render ( ) {
62- let { smoothScrolling, isDragging, type, scrollbarStyle, containerStyle} = this . props ;
62+ let { smoothScrolling, isDragging, type, scrollbarStyle, className , containerStyle, containerClassName } = this . props ;
6363 let isVoriziontal = type === 'horizontal' ;
6464 let isVertical = type === 'vertical' ;
6565 let scrollStyles = this . createScrollStyles ( ) ;
6666 let springifiedScrollStyles = smoothScrolling ? modifyObjValues ( scrollStyles , x => spring ( x ) ) : scrollStyles ;
6767
68- let scrollbarClasses = `scrollbar-container ${ isDragging ? 'active' : '' } ${ isVoriziontal ? 'horizontal' : '' } ${ isVertical ? 'vertical' : '' } ` ;
68+ let scrollbarClasses = `scrollbar-container ${ containerClassName || '' } ${ isDragging ? 'active' : '' } ${ isVoriziontal ? 'horizontal' : '' } ${ isVertical ? 'vertical' : '' } ` ;
6969
7070 return (
7171 < Motion style = { springifiedScrollStyles } >
@@ -77,7 +77,7 @@ class ScrollBar extends React.Component {
7777 ref = { x => this . scrollbarContainer = x }
7878 >
7979 < div
80- className = " scrollbar"
80+ className = { ` scrollbar ${ className || '' } ` }
8181 style = { { ...scrollbarStyle , ...style } }
8282 onMouseDown = { this . handleMouseDown . bind ( this ) }
8383 />
@@ -167,6 +167,8 @@ ScrollBar.propTypes = {
167167 realSize : React . PropTypes . number ,
168168 containerSize : React . PropTypes . number ,
169169 position : React . PropTypes . number ,
170+ className : React . PropTypes . string ,
171+ containerClassName : React . PropTypes . string ,
170172 containerStyle : React . PropTypes . object ,
171173 scrollbarStyle : React . PropTypes . object ,
172174 type : React . PropTypes . oneOf ( [ 'vertical' , 'horizontal' ] ) ,
0 commit comments