-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[ListItem] Add the ability to change the colour of the nested indicator icon #3654
Comments
A quick fix would be to override the theme color for 'listItem.rightIcon' |
@adrianmc : were you able to solve the problem using the above solution? Menu and ListItem component is currently too complexed and a rewrite is being planned. If you were able to get the problem fixed by overriding the 'listItem.rightIcon' color, I would close this for now. Do let me know. |
@tintin1343 Unfortunately, I didn't get around to it. I just gave up and omitted the indicator. It's not a big deal, just something to think about on the next rewrite, I guess. Thanks anyway. |
@adrianmc : Thanks for pointing it out. SInce the problem was not solved I am reopening this issue so that we can keep a track of changes we need to do for the redesign. |
@adrianmc @sorahn @tintin1343 : That solution did not work as it looks like the theme color is only being applied when a rightIcon is sent through the ListItem props. It is not applied to the icon the ListItem uses by default. This is from the ListItem class:
The "rightIcon" it is referring to is what it pulls in from props. |
To be honest, I just gave up and went with React Toolbox. They have a On Aug 19, 2016 9:24 PM, "Dusty Sirmans" [email protected] wrote:
|
You can always use css to target the svg tag's color. That's what I did. |
So now that this is closed, how to properly change this without affecting the styles globally for every list and without playing around with CSS? |
This was closed as we now expose a |
This is a feature request/discussion concerning this component: http://www.material-ui.com/#/components/list
I came across this problem while trying to implement a dark theme. For the list component, I was able to easily set the background colour to be a dark colour as well as change the text to a light colour to maintain contrast.
However, a problem arises, when I have a nested list item. The nested indicator icon seems to only display in a dark colour, making it hard for the user to see it on a dark background.
See picture here:
Lines 606 and 607 of
list-item.jsx
shows us that this is because it's rendering the default icon component whenever the list is being collapsed or expanded.See source here.
I can override the icon by using the rightIcon prop, but it no longer flips up and down due to the fact that it's just a static icon.
My proposal is to add a
nestedIndicatorColor
prop so we can control the way the "generated" indicator looks on dark backgrounds.Thoughts? If there is support, I will attempt a pull-request.
The text was updated successfully, but these errors were encountered: