From b2c2b901a6b283c3c539dd93ad6c92e39b0ed247 Mon Sep 17 00:00:00 2001 From: "D. Ror" Date: Wed, 8 Nov 2023 03:32:00 -0500 Subject: [PATCH] Remove superfluous react-double-scrollbar (#804) Co-authored-by: Domino987 --- package-lock.json | 17 ++--------------- package.json | 1 - src/components/MTableScrollbar/index.js | 19 +++++++++---------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index a412caf4..9b9b2b13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,6 @@ "deep-eql": "^4.1.1", "deepmerge": "^4.2.2", "prop-types": "^15.8.1", - "react-double-scrollbar": "0.0.15", "uuid": "^9.0.0", "zustand": "^4.3.0" }, @@ -79,8 +78,8 @@ }, "peerDependencies": { "@mui/system": ">=5.10.7", - "react": ">=16.8.0", - "react-dom": ">=16.8.0" + "react": ">=18.0.0", + "react-dom": ">=18.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -3697,7 +3696,6 @@ "deep-eql": "^4.1.1", "deepmerge": "^4.2.2", "prop-types": "^15.8.1", - "react-double-scrollbar": "0.0.15", "uuid": "^9.0.0", "zustand": "^4.3.0" }, @@ -16011,17 +16009,6 @@ "loose-envify": "^1.1.0" } }, - "node_modules/react-double-scrollbar": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/react-double-scrollbar/-/react-double-scrollbar-0.0.15.tgz", - "integrity": "sha512-dLz3/WBIpgFnzFY0Kb4aIYBMT2BWomHuW2DH6/9jXfS6/zxRRBUFQ04My4HIB7Ma7QoRBpcy8NtkPeFgcGBpgg==", - "engines": { - "node": ">=0.12.0" - }, - "peerDependencies": { - "react": ">= 0.14.7" - } - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/package.json b/package.json index 43d92664..6d1b30cb 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,6 @@ "deep-eql": "^4.1.1", "deepmerge": "^4.2.2", "prop-types": "^15.8.1", - "react-double-scrollbar": "0.0.15", "uuid": "^9.0.0", "zustand": "^4.3.0" }, diff --git a/src/components/MTableScrollbar/index.js b/src/components/MTableScrollbar/index.js index 9c7c31ce..e70e62f0 100644 --- a/src/components/MTableScrollbar/index.js +++ b/src/components/MTableScrollbar/index.js @@ -1,10 +1,13 @@ import React from 'react'; import { Box } from '@mui/material'; -import DoubleScrollbar from 'react-double-scrollbar'; -const horizontalScrollContainer = { +const doubleStyle = { overflowX: 'auto', - position: 'relative', + position: 'relative' +}; + +const singleStyle = { + ...doubleStyle, '& ::-webkit-scrollbar': { WebkitAppearance: 'none' }, @@ -12,18 +15,14 @@ const horizontalScrollContainer = { height: 8 }, '& ::-webkit-scrollbar-thumb': { - borderRadius: 4, + backgroundColor: 'rgba(0, 0, 0, .3)', border: '2px solid white', - backgroundColor: 'rgba(0, 0, 0, .3)' + borderRadius: 4 } }; const ScrollBar = ({ double, children }) => { - if (double) { - return {children}; - } else { - return {children}; - } + return {children}; }; export default ScrollBar;