-
-
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
[material-ui][SpeedDialAction] Add slots and slotProps #45065
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy previewhttps://deploy-preview-45065--material-ui.netlify.app/ @material-ui/core: parsed: +0.09% , gzip: +0.07% Bundle size reportDetails of bundle changes (Toolpad) |
This comment was marked as outdated.
This comment was marked as outdated.
@siriwatknp PR is ready for review |
shouldForwardComponentProp: true, | ||
className: clsx(classes.fab, className), | ||
additionalProps: { | ||
style: { |
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.
style: { | |
style: transitionStyle |
No need to spread the FabProps.style
, the slotProps.fab.style
(from FabProps
) will be merged by useSlot
.
onClose: handleTooltipClose, | ||
onOpen: handleTooltipOpen, |
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.
These should goes into getSlotProps
, so that slotProps.tooltip.onOpen
does not replace the handleTooltipClose
.
elementType: Tooltip,
externalForwardedProps,
shouldForwardComponentProp: true,
ref,
getSlotProps: (handlers) => ({
onClose: () => {
handlers.onClose?.(),
handleTooltipClose(),
},
onOpen: …
})
expectedClassName: classes.fab, | ||
testWithElement: null, | ||
testWithComponent: CustomButton, | ||
}, |
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.
Other slots are missing.
If you don't mind, can you do it directly in this PR? |
part of #41281
This PR adds
fab
,tooltip
,staticTooltip
,staticTooltipLabel
slots, I'll deprecate tooltip* props in seperate PR