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

Custom variant types not working properly #182

Open
legendsjohn opened this issue Aug 8, 2022 · 1 comment
Open

Custom variant types not working properly #182

legendsjohn opened this issue Aug 8, 2022 · 1 comment

Comments

@legendsjohn
Copy link
Contributor

Mui custom themes not working with Typescript:

declare module "@mui/material/styles" {
    interface TypographyVariants {
      h1Bold: React.CSSProperties;
    }
  
    // allow configuration using `createTheme`
    interface TypographyVariantsOptions {
      h1Bold?: React.CSSProperties;
    }
  }
  
  // Update the Typography's variant prop options
  declare module "@mui/material/Typography" {
    interface TypographyPropsVariantOverrides {
      h1Bold: true;
    }
  }
  

from documentation: https://mui.com/material-ui/customization/typography/#adding-amp-disabling-variants

However, it doesn't work.

Also referenced here: mui/material-ui#15573 and

@legendsjohn
Copy link
Contributor Author

Screen Shot 2022-08-08 at 12 55 00 PM

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

No branches or pull requests

1 participant