Reputation: 7785
I have a problem overriding the styles in my theme in Material UI in React.
I wanted to customize the border
of columnsContainer
but it isn't working. only the root
is working well.
MuiDataGrid.js
export default {
root: {
backgroundColor: "white",
border: `1px solid green`,
"& .columnsContainer": {
borderBottom: `1px solid 'blue' !important`
}
}
};
Upvotes: 1
Views: 645
Reputation: 81166
Below is the correct syntax. The changes compared to your code sandbox are:
.columnsContainer
with .MuiDataGrid-columnsContainer
1px solid blue
instead of 1px solid 'blue' !important
.export default {
root: {
backgroundColor: "white",
border: `1px solid green`,
"& .MuiDataGrid-columnsContainer": {
borderBottom: `1px solid blue`
}
}
};
Upvotes: 2