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

[System] Simplify theme input types for CssVarsProvider #33381

Merged
merged 6 commits into from
Jul 4, 2022

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Jul 4, 2022

widening theme prop typings in CssVarsProvider:

<CssVarsProvider theme={
 // this can be any object with { cssVarsPrefix, colorSchemes } because they are the only thing that `CssVarsProvider` cares about
}>

Joy

  • rename ThemeInput to CssVarsThemeOptions to follow Material UI

Material UI

  • add missing type for snackbar color
  • simplify module augmentation to ease maintenance

Module augmentation still works: https://codesandbox.io/s/create-react-app-with-typescript-forked-ji3dgf?file=/src/App.tsx


@siriwatknp siriwatknp added package: system Specific to @mui/system package: material-ui Specific to @mui/material package: joy-ui Specific to @mui/joy labels Jul 4, 2022
@mui-bot
Copy link

mui-bot commented Jul 4, 2022

No bundle size changes

Generated by 🚫 dangerJS against 16a298b

@siriwatknp siriwatknp merged commit 53371c2 into mui:master Jul 4, 2022
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: joy-ui Specific to @mui/joy package: material-ui Specific to @mui/material package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants