[core] Fix TypographyStyle not allowing media queries and allowing unsafe undefined access#19269
Conversation
Style is too generic and can be confused with a `style` object
|
No bundle size changes comparing 020b746...9427b27 |
…safe undefined access mui#19269
9a2a9d2 to
312e1db
Compare
| }, | ||
| }); | ||
|
|
||
| // $ExpectType string | undefined |
There was a problem hiding this comment.
Was $ExpectType string before this change which would be to narrow given the above theme.
| }, | ||
| }; | ||
|
|
||
| export default function ResponsiveFontSizes() { |
There was a problem hiding this comment.
CustomResponsiveFontSizes?
There was a problem hiding this comment.
Should be, yes. It has little impact though
There was a problem hiding this comment.
Yeah, it's a minor detail. I have included in the next batch of small changes. I wonder if we shouldn't change the approach: 1. either rename all the demos, to, say 'Demo' or 2. test the exported name and throw.
There was a problem hiding this comment.
I tend to think that giving a nice name to the demo doesn't matter and that we can normalize it (option 1).
|
|
||
| export default function ResponsiveFontSizes() { | ||
| return ( | ||
| <div> |
There was a problem hiding this comment.
Copied from the demo belowe
| <CssBaseline /> | ||
| {children} | ||
| </ThemeProvider> | ||
| </ThemeProvider>; |
There was a problem hiding this comment.
It's from prettier. If the semicolon is "off" then so is the code.
Addresses #19263 (comment)
Just illustrating that it wasn't typed. Working on a fix.