-
-
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][Alert] complete slots
and slotProps
#44971
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy previewhttps://deploy-preview-44971--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
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, just added 2 suggestions
@@ -191,6 +191,7 @@ const Alert = React.forwardRef(function Alert(inProps, ref) { | |||
const classes = useUtilityClasses(ownerState); | |||
|
|||
const externalForwardedProps = { | |||
...other, |
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.
Why is ...other
here?
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.
So that the useSlot
can handle the component
prop (in …other
) properly for the root slot.
@@ -64,7 +64,7 @@ export interface ConformanceOptions { | |||
testStateOverrides?: { prop?: string; value?: any; styleKey: string }; | |||
testCustomVariant?: boolean; | |||
testVariantProps?: object; | |||
testLegacyComponentsProp?: boolean; | |||
testLegacyComponentsProp?: boolean | string[]; |
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.
Need to add this to be able to test specific slot of components.*
Added missing slots:
root
,icon
,message
and `action.