I'm now trying to create a website using material-ui with react. I needed to add my own style to mui components. For this purpose, I used the makeStyle from '@mui', But The problem is that if I want to make changes to the material components, I have to use the ( !important ) with each stage.
so here is simple example:
App.js
import { makeStyles } from "@mui/styles";
import { Button } from "@mui/material";
const useStyles = makeStyles({
btn: {
backgroundColor: "red !important",
},
});
function App() {
const classes = useStyles();
return (
<>
<Button variant="contained" className={classes.btn}>
Click me
</Button>
</>
);
}
export default App;
if i want to change the <Button> background i must use !important with css code . so What do I have to do now ???
versions: "@mui/material": "^5.4.4", "@mui/styles": "^5.5.1",