@@ -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 = { { ...scrollbarStyle , ...springifiedScrollStyles } } >
@@ -75,7 +75,7 @@ class ScrollBar extends React.Component {
7575 onMouseDown = { this . handleScrollBarContainerClick . bind ( this ) }
7676 ref = { x => { this . scrollbarContainer = x } } >
7777
78- < div className = " scrollbar"
78+ < div className = { ` scrollbar ${ className || '' } ` }
7979 style = { style }
8080 onMouseDown = { this . handleMouseDown . bind ( this ) }
8181 >
@@ -163,6 +163,8 @@ ScrollBar.propTypes = {
163163 realSize : React . PropTypes . number ,
164164 containerSize : React . PropTypes . number ,
165165 position : React . PropTypes . number ,
166+ className : React . PropTypes . string ,
167+ containerClassName : React . PropTypes . string ,
166168 containerStyle : React . PropTypes . object ,
167169 scrollbarStyle : React . PropTypes . object ,
168170 type : React . PropTypes . oneOf ( [ 'vertical' , 'horizontal' ] ) ,
0 commit comments