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

Fix layout component type #5473

Merged
merged 4 commits into from
Nov 3, 2020
Merged

Fix layout component type #5473

merged 4 commits into from
Nov 3, 2020

Conversation

fzaninotto
Copy link
Member

Supersedes #5399

@fzaninotto fzaninotto added the RFR Ready For Review label Nov 2, 2020
@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱 🤔

Copy link
Contributor

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 ?

Copy link
Member Author

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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@djhi djhi merged commit eb3c63a into master Nov 3, 2020
@djhi djhi deleted the filx-layout-type branch November 3, 2020 08:35
@fzaninotto fzaninotto added this to the 3.10.0 milestone Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants