0

This is in my theme.tsx:

Const baseTheme: Omit< ThemeOptions, | “properties1” | “properties2” > export DarkTheme = createTheme({ …baseTheme, …themeDark, palette: { …baseTheme.palette, mode: dark } }); function customDefaultThemeProvider({ children, theme = DarkTheme }: customDefaultThemeProviderProps) { return ( <ThemeProvider theme = {theme || DarkTheme}> {children} </ThemeProvider>); } 

I have an error Type ‘Theme is missing the following properties from type ‘Theme’: properties1, properties2, properties3, properties4 and 3 more. The error is coming from my "theme" from "theme = Darktheme".

It was working well until I installed another style package. I realized this new installed package was overwritting my themesOption and Themes and made some properties mandatory and add new properties through theme.d.ts.

These are the steps I did to resolve this:

  1. I added my own theme.d.ts file but it did not work.
  2. I added "Partial" and for my baseTheme and theme but it did not work.
New contributor
david scholar is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • What type does createTheme return? Maybe you could provide default values for these new properties.Commented8 hours ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.