-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Card] Migrate CardMedia to emotion #24625
Conversation
@material-ui/core: parsed: +0.14% , gzip: +0.08% |
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.
Looks much better! Last two comments and I believe we are good to go :)
@@ -79,7 +79,7 @@ describe('<CardMedia />', () => { | |||
|
|||
it('warns when neither `children`, nor `image`, nor `src`, nor `component` are provided', () => { | |||
expect(() => { | |||
PropTypes.checkPropTypes(CardMedia.Naked.propTypes, { classes: {} }, 'prop', 'MockedName'); |
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 test was failing with propTypes
cannot be read from undefined
.
I looked at other Mui component with this test but none of the others have been converted yet, therefore I was not sure if this was the correct approach.
Removing the Naked
got the tests passing.
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.
That's the correct solution 👍
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.
A bit of clarification Naked
was added by the withStyles
utility, we don't use it anymore, so this is correct :)
* next: (34 commits) [Tab] Migrate to emotion (mui#24651) [TextField] Migrate Input component to emotion (mui#24638) [ImageList] Migrate ImageListItemBar to emotion (mui#24632) [CircularProgress] Migrate to emotion (mui#24622) [DataTable] Add example in docs for data table (mui#24428) [Card] Migrate CardActionArea to emotion (mui#24636) [core] Fix `next` using stale pages (mui#24635) [List] Migrate ListItemIcon to emotion (mui#24630) [ClickAwayListener] Fix `children` and `onClickAway` types (mui#24565) [docs] Include in docs directive to silence `eslint` erroneous warning (mui#24644) [Fab] Migrate to emotion (mui#24618) [TextField] Migrate FilledInput to emotion (mui#24634) [Card] Migrate CardHeader to emotion (mui#24626) [Card] Migrate CardMedia to emotion (mui#24625) [ImageList] Migrate ImageListItem to emotion (mui#24619) [website] Add vision block (mui#24603) [docs] Add sorting section (mui#24637) [TextField] Prepare removal of labelWidth prop (mui#24595) [Dialog] Migrate DialogTitle to emotion (mui#24623) [ImageList] Migrate to emotion (mui#24615) ...
#24405