更改DropDownMenu列表项选择的颜色

时间:2016-10-04 07:45:30

标签: javascript reactjs material-ui formsy-material-ui

您好我正在尝试更改material-ui元素的选定颜色,但我找不到有关如何执行此操作的任何信息。我想把这种粉红色变成蓝色。

enter image description here

编辑:也许这是要走的路,但我无法做到这一点:

import getMuiTheme from 'material-ui/lib/styles/getMuiTheme';

const muiTheme = getMuiTheme({}, {
  menuItem: {
  selectedTextColor: 'white',
  },
});

1 个答案:

答案 0 :(得分:0)

我设法实现了我想到的解决方案:

import getMuiTheme from 'material-ui/styles/getMuiTheme';

const muiTheme = getMuiTheme({}, {
  palette: {
    accent1Color: 'blue',
  },
});

并在渲染中:

<MuiThemeProvider muiTheme={muiTheme}>