-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Improving documentation for react-simplebar #383
Comments
Hey,
Right, we should have some recipes of CSS snippets showing how to do usual things, like change scrollbar color, thickness, etc.
Unfortunately this really depends on your stack: if you use something like Create React App or Gatsby, just importing the css file like written in the doc will work straight away.
Right. |
Thanks @Grsmto for your response. As for number 4, I did not articulate it well. I replaced the scroll wrapper we previously used with the simplebar and originally the bar didn't work on certain views. It took me some time to understand what was going on. I solved it by adding "overflow:hidden;" to the parent div. So I thought we might want to give some best css practices to handle this gracefully. Perhaps we can show the diagram below. You raised another issue. Some projects such as ours don't use css files, but use css in js. usually css in js libraries have solutions for this. Emotion for example has an |
Just to understand, |
@krachtstefan no it's not. There is no unreleased alpha version at the moment. The latest version is |
I was using
I made a sandbox for illustration (same example but different simplebar-react dependency) Am I using it wrong 🤔 |
Wow, that was quick! Thanks for this repository, it really solves an annoying problem with a very easy to use component! 🙏 |
I'm using "react-simplebar". This is a helpful well performing library, that rightly gains a lot of popularity in recent months. However, current documentation seems insufficient and misleading.
Is your feature request related to a problem? Please describe.
Having a difficult time customizing the react component to get a ref, and customize the appearance (style and when it shows, width) of the scrollbar. Trying docs suggestion did not work and had to find alternatives.
Describe the solution you'd like
Updating documentation for how to use the react version of the library.
Additional context
When trying to pass render function as props no children were rendered to the dom. Looking at various issues I found this solution:
Which allows to pass ref and onScroll props to the scroll wrapper.
2) Trying to pass other props according to the documentation resulted in no effect on the screen.
3) A clear documentation of how to customise appearnce of the component could be helpful.
4) It isn't trivial how to embed this component in terms of style and CSS. Perhaps a few best practices could be recommended.
5)It should be mentioned where users should look for support - here on github or on Stackoverflow. If on SOF, perhaps a new tag could be created.
I'd be happy to contribute, though I am new to this library and some of it still isn't clear to me.
The text was updated successfully, but these errors were encountered: