-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
theme: fix font weight type issue #19366
Conversation
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah very nice catch. Yeah I discovered in one component if I did this it passed type checking, so spot on!! :)
label: {
textTransform: 'uppercase',
- fontWeight: theme.typography.fontWeightBold,
+ //fontWeight: theme.typography.fontWeightBold,
letterSpacing: 1.2,
},
// This fixes as type incompatibility that is caused by a variance in the declaration of | ||
// the font weight types in the MUI v4 theme typography and styles such as through `makeStyles()`. | ||
// The font weight in styles are defined to be `CSSProperties["fontWeight"]` from `csstype`, while the | ||
// front weight in the typography are defined to be `React.CSSProperties["fontWeight"]` from `@types/react`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// This fixes as type incompatibility that is caused by a variance in the declaration of | |
// the font weight types in the MUI v4 theme typography and styles such as through `makeStyles()`. | |
// The font weight in styles are defined to be `CSSProperties["fontWeight"]` from `csstype`, while the | |
// front weight in the typography are defined to be `React.CSSProperties["fontWeight"]` from `@types/react`. | |
// This fixes a type incompatibility that is caused by a variance in the declaration of | |
// the font weight types in the MUI v4 theme typography and styles such as through `makeStyles()`. | |
// The font weight in styles are defined to be `CSSProperties["fontWeight"]` from `csstype`, while the | |
// font weight in the typography are defined to be `React.CSSProperties["fontWeight"]` from `@types/react`. |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
@Rugvip, did you mean for this to close? |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Hey, I just made a Pull Request!
Fixes an issue where a bad combination of dependency versions causes font weight from the theme to not be usable as styles. See #19364 and #19255
Should help smooth out MUI v5 migration as you'd often hit this when migrating to v5. #7094
✔️ Checklist
Signed-off-by
line in the message. (more info)