-
Notifications
You must be signed in to change notification settings - Fork 602
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
TreeView: Add support for external styling #4487
Comments
Hi! Thanks for taking the time!
I see TreeView doesn't support sx for all the child items. This was partially intentional at the time of building it so that the design does not deviate too much. The use cases however are many and varied now (like NestedListView!) We want to phase out styling through a prop (sx) over time, so I would recommend using classNames. However, TreeView does not have reliable selectors that you can target yet. Would that be a useful change for you? |
@siddharthkp I think a good solution would be to support custom styling on
I think we should probably avoid getting into the habit of exposing targetable selectors, because it makes things difficult to change. Long term, it will make it harder for PRC to move to CSS Modules because the class names would need to remain static. If there's specific things we want to support styling internally, I think we should either add props for the required variants, like Or, one more option might be to set |
Closed by #4512 |
Description
We are using TreeView in the NestedListView and we needed to override some styling to match the design needs for using NestedListView for SubIssues.
Currently, we are using css selectors to override some of the styles (which seems a little hacky) and thought it would be helpful we could pass styles using a prop.
Example PRs:
The text was updated successfully, but these errors were encountered: