Skip to content
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

Change the color of <ListItem> icons via custom theme #5450

Closed
jampy opened this issue Oct 21, 2016 · 5 comments
Closed

Change the color of <ListItem> icons via custom theme #5450

jampy opened this issue Oct 21, 2016 · 5 comments
Labels
component: drawer This is the name of the generic UI component, not the React module! support: question Community support but can be turned into an improvement

Comments

@jampy
Copy link

jampy commented Oct 21, 2016

Problem description

image

This is a <Drawer> with a custom theme (I want the drawer in a dark theme, while the main content uses a light theme):

          <MuiThemeProvider muiTheme={sidebarTheme}>
            <Drawer
              docked={false}
              width={this.props.width}
              open={this.props.openDrawer}
              onRequestChange={this.handleDrawerChange}
            >
              {this.props.drawerContent}
            </Drawer>
          </MuiThemeProvider>

How can I change the color of the left icons?

This is the sidebarTheme I'm using:

import baseTheme from 'material-ui/styles/baseThemes/darkBaseTheme';

import * as colors from 'material-ui/styles/colors';

export default {
  ...baseTheme,
  palette: {
    ...baseTheme.palette,

    canvasColor: colors.green900,
    primary1Color: colors.lime500,

    // just testing:
    listItem: {
      leftIconColor: "#FFFF00",
      rightIconColor: "#FFFF00",
    },

    svgIcon: {
      color: "#FFFF00"
    }
  }
};

I can't find the right setting to change the icon - or, the setting does not work...

Versions

  • Material-UI: 0.16.0
  • React: 15.3.2
  • Browser: Google Chrome 54.0.2840.59 m (64-bit)
@lucasbento lucasbento added support: question Community support but can be turned into an improvement component: drawer This is the name of the generic UI component, not the React module! labels Oct 21, 2016
@lucasbento
Copy link

@jampy: can you please provide a bin to reproduce the code that you provided?

The color of icons should be changed on the content of the drawer (probably <MenuItem /> components) which I can not tell by your code.

@lucasbento lucasbento added the waiting for 👍 Waiting for upvotes label Oct 21, 2016
@jampy
Copy link
Author

jampy commented Nov 8, 2016

@lucasbento
Copy link

@jampy: I just commented in the issue, I hope that works for you!

@lucasbento
Copy link

Closing this due to inactivity.

@oliviertassinari oliviertassinari removed the waiting for 👍 Waiting for upvotes label Oct 2, 2017
@MinaroShikuchi
Copy link

See #16572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: drawer This is the name of the generic UI component, not the React module! support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

4 participants