You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
I created a new color palette I want to use on a Button as in accordance to the documentation:
const theme = createTheme({
palette: {
customRed: {
main: "#ff1100",
light: "#f75348",
dark: "#ba1f14",
contrastText: "#FFF",
},
}
})
Then extended TypeScript declarations:
declare module "@mui/material/styles" {
interface Palette {
customRed: Palette["primary"];
}
interface PaletteOptions {
customRed?: PaletteOptions["primary"];
}
But then I get a TS error when using the new color palette on a Button (Type "customRed" is not assignable to type):
ButtonIt should work and it used to work for me in the past, but now it doesn't. Any ideas on how to expand my color palette for buttons?
Search keywords:
The text was updated successfully, but these errors were encountered: