summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2020-08-13 09:25:13 +0200
committerOskar Nyberg <oskar@mullvad.net>2020-08-13 09:25:13 +0200
commitedc74bbaccbc52dca8ed458c91985c1ec424e349 (patch)
tree8ac93a16e241585514ea8fe28f49ead05def3d77 /gui/src/renderer
parent5d8b85c355a4c29d18d8f498db9498f02bc3bab2 (diff)
downloadmullvadvpn-edc74bbaccbc52dca8ed458c91985c1ec424e349.tar.xz
mullvadvpn-edc74bbaccbc52dca8ed458c91985c1ec424e349.zip
Prevent overriding of CustomScrollbars className prop
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/components/CustomScrollbars.tsx4
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}`}