-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[material-ui][Drawer] Deprecate *Props and complete slots
, slotProps
#44960
Conversation
…ecation/drawer
Netlify deploy previewSwipeableDrawer: parsed: +1.34% , gzip: +1.09% Bundle size reportDetails of bundle changes (Toolpad) |
c5569df
to
f6eeba7
Compare
…ecation/drawer
docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md
Outdated
Show resolved
Hide resolved
Few tests are failing after recent changes |
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.
LGTM
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.
LGTM!
Two small comments about the slots' descriptions
Part of #41281
This PR also include SwipeableDrawer because it has Drawer as a direct dependency.
BackdropComponent
,BackdropProps
,PaperProps
,SlideProps
in favor ofslots.backdrop
,slotProps.backdrop
,slotProps.paper
,slotProps.transition
respectively.mergeSlotProps
to handle callbacks properly.Note: I decided not to deprecate
ModalProps
because it cannot be migrated toslotProps.root
. This case is special because theDrawerRoot
is a wrapper ofModal
(a Material UI component), so theModalProps
must to be spread directly to Modal, not throughslotProps.root
.Also,
ModalProps
cannot be spread directly toDrawer
because it's specific to<Drawer variant="temporary">
.