Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated type definitions #111

Open
javiertury opened this issue Dec 21, 2023 · 0 comments
Open

Outdated type definitions #111

javiertury opened this issue Dec 21, 2023 · 0 comments

Comments

@javiertury
Copy link

This theme introduces outdated type definitions from old versions of @mui/material and it causes typing errors. For instance,

error TS2741: Property 'placeholder' is missing in type '{ children: string; color: "inherit"; variant: "contained"; }' but required in type 'Pick<{ children?: ReactNode; classes?: Partial<ButtonClasses> | undefined; color?: "inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined; ... 9 more ...; variant?: "text" | ... 2 more ... | undefined; } & Omit<...> & CommonProps & Omit<...> & GatsbyProps, "to" | ... 283 more ... ...'.

181         <NavigationButton
             ~~~~~~~~~~~~~~~~

is caused by a Pick<ButtonProps, 'placeholder' ...>. The problem is that there is no placeholder to pick, so it resolves to { placeholder: unknown, ...} and typescript then thinks that the non-existing property placeholder is required.

This error seems similar to creativetimofficial/material-tailwind#528.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant