I'm using malihu-custom-scrollbar-plugin in my ReactJS project, I can customize the scroll bar by editing the css in node_modules, the problem here after an npm install all the changes in node_modules will be gone, I need a way to edit the size, the color of the scrollbar dragger and the scrollbar rails. also the up and down buttons, inside the src file and not in node modules
Here is the code I'm using for malihu-custom-scrollbar-plugin:
import Box from '@mui/material/Box'
import $ from 'jquery';
import 'malihu-custom-scrollbar-plugin';
import 'malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css';
require('jquery-mousewheel');
const ListComponent = () => {
React.useEffect(()=>{
$('.scroll').mCustomScrollbar({
scrollButtons:{enable:true},
theme:"rounded-dots-dark",
scrollInertia:500
});
},[])
return (
<Box style={{overflowY: "hidden",
height: "300px"}} className='scroll'>
<p> A long lines of text</p>
</Box>
)
}