Skip to content

Commit

Permalink
Possibility to override the default styles;
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi committed Oct 24, 2018
1 parent d5efd40 commit 9127563
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export default class Scrollbar extends React.Component

const {content, trackVertical, trackHorizontal, thumbVertical, thumbHorizontal} = this;

content.removeEventListener("scroll", this.handleScrollEvent, { passive: true });
content.removeEventListener("scroll", this.handleScrollEvent, {passive: true});
trackVertical.removeEventListener("mousedown", this.handleTrackVerticalMousedownEvent);
trackHorizontal.removeEventListener("mousedown", this.handleTrackHorizontalMousedownEvent);
thumbVertical.removeEventListener("mousedown", this.handleThumbVerticalMousedownEvent);
Expand Down Expand Up @@ -651,19 +651,19 @@ export default class Scrollbar extends React.Component
thumbHorizontalClassNames = "ScrollbarsCustom-thumb ScrollbarsCustom-thumbHorizontal" + (thumbHorizontalClassName ? (" " + thumbHorizontalClassName) : "");

const holderStyles = {
...style,
...(defaultStyles && defaultElementsStyles.holder),
...style,
...({direction: (rtl === true && "rtl") || (rtl === false && "ltr") || null}),
},
wrapperStyles = {
...wrapperStyle,
...(defaultStyles && defaultElementsStyles.wrapper),
...wrapperStyle,
position: "relative",
overflow: "hidden",
},
contentStyles = {
...contentStyle,
...defaultElementsStyles.content,
...contentStyle,
overflowX: "scroll",
overflowY: "scroll",
marginBottom: -(browserScrollbarWidth || fallbackScrollbarWidth),
Expand All @@ -675,16 +675,16 @@ export default class Scrollbar extends React.Component
...(defaultStyles && defaultElementsStyles.trackVertical),
},
trackHorizontalStyles = {
...trackHorizontalStyle,
...(defaultStyles && defaultElementsStyles.trackHorizontal),
...trackHorizontalStyle,
},
thumbVerticalStyles = {
...thumbVerticalStyle,
...(defaultStyles && defaultElementsStyles.thumbVertical),
...thumbVerticalStyle,
},
thumbHorizontalStyles = {
...thumbHorizontalStyle,
...(defaultStyles && defaultElementsStyles.thumbHorizontal),
...thumbHorizontalStyle,
};

if (noScroll || (noScrollX && noScrollY)) {
Expand Down

0 comments on commit 9127563

Please sign in to comment.