-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Fix layout component type #5473
Conversation
@@ -6,7 +6,7 @@ export const darkTheme = { | |||
secondary: { | |||
main: '#FBBA72', | |||
}, | |||
type: 'dark', // Switching the dark mode on is a single property value change. | |||
type: 'dark' as 'dark', // Switching the dark mode on is a single property value change. |
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.
😱 🤔
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.
Does it mean users will have to cast this as well ?
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.
yes, that's because MUI defines the type
type as 'dark' | 'light'
, and TypeScript is dumb. Nothing we can do to avoid that.
@@ -32,6 +32,7 @@ export const lightTheme = { | |||
background: { | |||
default: '#fcfcfe', | |||
}, | |||
type: 'light' as 'light', |
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.
👀
Supersedes #5399