As the title says. Both accept same kind of ThemeOptions object.
const theme = createMuiTheme({
palette: {
primary: {
main: "#006400"
},
secondary: {
main: "#ffa500"
}
}
});
const theme = createTheme({
palette: {
primary: {
main: "#006400"
},
secondary: {
main: "#ffa500"
}
}
});
Is createMuiTheme() only for applying styles to Mui components, and not my custom components?
If I want to create custom CSS classes, should I use makeStyles() instead?
createTheme is the newer name, createMuiTheme is deprecated https://github.com/elyra-ai/elyra/pull/1885. You are correct createTheme() is used to apply different default styles to the Mui components
makeStyles() is a good way to make custom css classes for your new components or the Mui components.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With