import React, { PureComponent } from 'react'; import Scrollbars from 'react-custom-scrollbars'; interface Props { customClassName?: string; autoHide?: boolean; autoHideTimeout?: number; autoHideDuration?: number; hideTracksWhenNotNeeded?: boolean; } /** * Wraps component into component from `react-custom-scrollbars` */ class CustomScrollbar extends PureComponent { static defaultProps: Partial = { customClassName: 'custom-scrollbars', autoHide: true, autoHideTimeout: 200, autoHideDuration: 200, hideTracksWhenNotNeeded: false, }; render() { const { customClassName, children, ...scrollProps } = this.props; return (
} renderTrackVertical={props =>
} renderThumbHorizontal={props =>
} renderThumbVertical={props =>
} renderView={props =>
} {...scrollProps} > {children} ); } } export default CustomScrollbar;