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

Update types to support MUI v5.15.11+ types #241

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

sjdemartini
Copy link
Owner

As of newer MUI versions, we require a couple adjustments to remain compatible. (The changes in this PR should be compatible with lower versions of MUI as well, but now ensure we don't break when users are installing newer MUI versions. Peer dependencies are still early MUI v5.)

  1. Update MenuSelect prop types to support MUI v5.15.11 types
  2. Appease TypeScript for heading fontSizes with makeStyles with MUI v5.15
    • Something about the fontSize definition has gotten more strict, so this works around the issue.

This also updates the dev dependencies within mui-tiptap to use the newest MUI, for easier testing of these changes.

As of
mui/material-ui#39137, MUI's `SelectProps` is
now a `type` and not an `interface`, so we can no longer `extend` it for
our own `MenuSelectProps`. As such, we now make `MenuSelectProps` a
`type` and use `&` syntax to inject additional props. This should
support both MUI < v5.15.11 (where `SelectProps` is an `interface`) and
>= 5.15.11 (where `SelectProps` is a `type`).
@sjdemartini sjdemartini merged commit 7c60b01 into main Jul 2, 2024
1 check passed
@sjdemartini sjdemartini deleted the ts-compatibility-with-mui-5.15.11 branch July 2, 2024 00:43
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

Successfully merging this pull request may close these issues.

1 participant