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

[Container] props type missing in Theme #18651

Closed
max10rogerio opened this issue Dec 2, 2019 · 3 comments · Fixed by #18654
Closed

[Container] props type missing in Theme #18651

max10rogerio opened this issue Dec 2, 2019 · 3 comments · Fixed by #18654
Labels
component: Container The React component good first issue Great for first contributions. Enable to learn the contribution process. typescript

Comments

@max10rogerio
Copy link
Contributor

In createMuiTheme, the MuiContainer props is missing...
How to override default props of this component?

Version: @material-ui/core: 4.7.1

Docs: https://material-ui.com/api/container/#css

Theme config:
image

TSLint error:

Argument of type '{ palette: { primary: Color; secondary: Color; grey: Color; }; typography: { fontFamily: string; }; props: { MuiTextField: { variant: "outlined"; fullWidth: true; }; MuiButton: { variant: "contained"; color: "primary"; }; MuiLinearProgress: { ...; }; MuiTabs: { ...; }; MuiDialog: { ...; }; MuiContainer: { ...; }; }; }' is not assignable to parameter of type 'ThemeOptions'.
  Types of property 'props' are incompatible.
    Type '{ MuiTextField: { variant: "outlined"; fullWidth: true; }; MuiButton: { variant: "contained"; color: "primary"; }; MuiLinearProgress: { variant: "indeterminate"; color: "secondary"; }; MuiTabs: { ...; }; MuiDialog: { ...; }; MuiContainer: { ...; }; }' is not assignable to type 'ComponentsProps'.
      Object literal may only specify known properties, and 'MuiContainer' does not exist in type 'ComponentsProps'.ts(2345)
@eps1lon
Copy link
Member

eps1lon commented Dec 2, 2019

@eps1lon eps1lon added the good first issue Great for first contributions. Enable to learn the contribution process. label Dec 2, 2019
@oliviertassinari
Copy link
Member

@max10rogerio Do you want to contribute the fix? :). It should be about adding the missing key.

@eps1lon eps1lon changed the title How to override default props Container? [Container] props type missing in Theme Dec 2, 2019
@max10rogerio
Copy link
Contributor Author

@oliviertassinari Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Container The React component good first issue Great for first contributions. Enable to learn the contribution process. typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants