-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize Color of Scrollbar #11
Comments
@gbroques I was able to customize the color by looking at the structure of the html and realizing that I can target the last child div of the If you're using import * as React from "react";
import { makeStyles } from "@material-ui/core";
import CustomScroller from "react-custom-scroller";
const useStyles = makeStyles({
scroller: {
"&> div:last-child": {
background: "rgba(34, 157, 158, 0.4)",
},
},
});
const CustomColorScoller = ({ children }) => {
const classes = useStyles();
return (
<CustomScroller className={classes.scroller}>{children}</CustomScroller>
);
};
export default CustomColorScoller; |
@ivnflpz Thank you for the workaround! I will close this issue. 😄 |
I'll keep it open because we plan to add an official way of doing this via props. |
This would be great. :) |
Yes, this would be awesome! |
How would we customize the color of the scrollbar from the default of
rgba(0, 0, 0, .1)
?I'd like to use this in an application with a dark background color, and
rgba(0, 0, 0, .1)
doesn't show up well on dark backgrounds.The text was updated successfully, but these errors were encountered: