From 6534b70b9707949622e9fe6a20393fd4367bde89 Mon Sep 17 00:00:00 2001 From: Maharudra Kekan <41204260+rudra143@users.noreply.github.com> Date: Mon, 30 Nov 2020 16:42:45 +0530 Subject: [PATCH] Update index.js Added Classes to Target the div elements to make CSS changes. --- src/Scrollbars/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Scrollbars/index.js b/src/Scrollbars/index.js index aa005289..ebcd84ee 100644 --- a/src/Scrollbars/index.js +++ b/src/Scrollbars/index.js @@ -568,26 +568,26 @@ export default class Scrollbars extends Component { display: 'none' }) }; - - return createElement(tagName, { ...props, style: containerStyle, ref: (ref) => { this.container = ref; } }, [ +// Added classes to the div elements to change its css as per requirements + return createElement(tagName, { ...props, classname: "scrollbar-container", style: containerStyle, ref: (ref) => { this.container = ref; } }, [ cloneElement( - renderView({ style: viewStyle }), + renderView({ classname: "scrollbar-container-inner", style: viewStyle }), { key: 'view', ref: (ref) => { this.view = ref; } }, children ), cloneElement( - renderTrackHorizontal({ style: trackHorizontalStyle }), + renderTrackHorizontal({ className: "scrollbar-horizontal-track", style: trackHorizontalStyle }), { key: 'trackHorizontal', ref: (ref) => { this.trackHorizontal = ref; } }, cloneElement( - renderThumbHorizontal({ style: thumbHorizontalStyleDefault }), + renderThumbHorizontal({ className: "scrollbar-horizontal-thumb", style: thumbHorizontalStyleDefault }), { ref: (ref) => { this.thumbHorizontal = ref; } } ) ), cloneElement( - renderTrackVertical({ style: trackVerticalStyle }), + renderTrackVertical({ className: "scrollbar-vertical-track", style: trackVerticalStyle }), { key: 'trackVertical', ref: (ref) => { this.trackVertical = ref; } }, cloneElement( - renderThumbVertical({ style: thumbVerticalStyleDefault }), + renderThumbVertical({ className: "scrollbar-vertical-thumb", style: thumbVerticalStyleDefault }), { ref: (ref) => { this.thumbVertical = ref; } } ) )