Update FancyScrollBar to use arrow properties
parent
2b2f07eb1c
commit
9b2aa48a84
|
@ -12,6 +12,10 @@ class FancyScrollbar extends Component {
|
||||||
autoHeight: false,
|
autoHeight: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleMakeDiv = className => props => {
|
||||||
|
return <div {...props} className={`fancy-scroll--${className}`} />
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {autoHide, autoHeight, children, className, maxHeight} = this.props
|
const {autoHide, autoHeight, children, className, maxHeight} = this.props
|
||||||
|
|
||||||
|
@ -25,15 +29,11 @@ class FancyScrollbar extends Component {
|
||||||
autoHideDuration={250}
|
autoHideDuration={250}
|
||||||
autoHeight={autoHeight}
|
autoHeight={autoHeight}
|
||||||
autoHeightMax={maxHeight}
|
autoHeightMax={maxHeight}
|
||||||
renderTrackHorizontal={props =>
|
renderTrackHorizontal={this.handleMakeDiv('track-h')}
|
||||||
<div {...props} className="fancy-scroll--track-h" />}
|
renderTrackVertical={this.handleMakeDiv('track-v')}
|
||||||
renderTrackVertical={props =>
|
renderThumbHorizontal={this.handleMakeDiv('thumb-h')}
|
||||||
<div {...props} className="fancy-scroll--track-v" />}
|
renderThumbVertical={this.handleMakeDiv('thumb-v')}
|
||||||
renderThumbHorizontal={props =>
|
renderView={this.handleMakeDiv('view')}
|
||||||
<div {...props} className="fancy-scroll--thumb-h" />}
|
|
||||||
renderThumbVertical={props =>
|
|
||||||
<div {...props} className="fancy-scroll--thumb-v" />}
|
|
||||||
renderView={props => <div {...props} className="fancy-scroll--view" />}
|
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Scrollbars>
|
</Scrollbars>
|
||||||
|
|
Loading…
Reference in New Issue