diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-08-13 09:25:13 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-08-13 09:25:13 +0200 |
| commit | edc74bbaccbc52dca8ed458c91985c1ec424e349 (patch) | |
| tree | 8ac93a16e241585514ea8fe28f49ead05def3d77 /gui | |
| parent | 5d8b85c355a4c29d18d8f498db9498f02bc3bab2 (diff) | |
| download | mullvadvpn-edc74bbaccbc52dca8ed458c91985c1ec424e349.tar.xz mullvadvpn-edc74bbaccbc52dca8ed458c91985c1ec424e349.zip | |
Prevent overriding of CustomScrollbars className prop
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/renderer/components/CustomScrollbars.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/src/renderer/components/CustomScrollbars.tsx b/gui/src/renderer/components/CustomScrollbars.tsx index 544dd58604..08e996c250 100644 --- a/gui/src/renderer/components/CustomScrollbars.tsx +++ b/gui/src/renderer/components/CustomScrollbars.tsx @@ -176,6 +176,7 @@ export default class CustomScrollbars extends React.Component<IProps, IState> { onScroll: _onScroll, fillContainer, children, + className, ...otherProps } = this.props; const showScrollbars = this.state.canScroll && this.state.showScrollIndicators; @@ -185,9 +186,10 @@ export default class CustomScrollbars extends React.Component<IProps, IState> { const thumbWideClass = this.state.isWide ? ' custom-scrollbars__thumb--wide' : ''; const trackClass = showScrollbars && this.state.showTrack ? ' custom-scrollbars__track--visible' : ''; + const classNames = className ? `${className} custom-scrollbars` : 'custom-scrollbars'; return ( - <div {...otherProps} className="custom-scrollbars"> + <div {...otherProps} className={classNames}> <div className={`custom-scrollbars__track ${trackClass}`} ref={this.trackRef} /> <div className={`custom-scrollbars__thumb ${thumbWideClass} ${thumbActiveClass} ${thumbAnimationClass}`} |
