如何在React中覆盖材料-ui-next css?

时间:2018-04-27 04:14:21

标签: reactjs material-ui

如何在React中覆盖material-ui-next css?

例如:

.MuiListItem-button-119 {
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
}

如何全球变化?

2 个答案:

答案 0 :(得分:1)

const theme = createMuiTheme({
    overrides: {
        MuiList:{
            padding:{
                paddingTop:0,
                paddingBottom:0
            }
        },
        MuiListItem: {
            button: {
                '&:hover': {
                    backgroundColor: 'rgb(0,0,0,0)'
                },
            },
        },
    }
})

答案 1 :(得分:0)

我不知道它是否适用于你的情况,但通常你应该使用!在css中重要 elm{ prop:val !important; }