Search keywords
slotProps, function, ownerState
Related page
https://mui.com/material-ui/customization/overriding-component-structure/#the-slotprops-prop
Kind of issue
Missing information
Issue description
I saw some code passing a { paper: (ownerState) => ... } function as a prop to a Popover, which surprised me. Looking at the Popover API docs page I can see that it specifies slotProps as { ..., paper?: func | object, ... }, but the relevant docs page about "Overriding component structure" only gives examples for the object variant and does not mention the ability to pass a function at all, even though it's clearly present in the type definition.
Context
I am trying to find official documentation on passing functions in slotProps, or at least a mention that states clearly whether it's part of the public API, meant for internal use, deprecated, or not recommended for any other reason.
Search keywords
slotProps, function, ownerState
Related page
https://mui.com/material-ui/customization/overriding-component-structure/#the-slotprops-prop
Kind of issue
Missing information
Issue description
I saw some code passing a
{ paper: (ownerState) => ... }function as a prop to a Popover, which surprised me. Looking at the Popover API docs page I can see that it specifiesslotPropsas{ ..., paper?: func | object, ... }, but the relevant docs page about "Overriding component structure" only gives examples for the object variant and does not mention the ability to pass a function at all, even though it's clearly present in the type definition.Context
I am trying to find official documentation on passing functions in
slotProps, or at least a mention that states clearly whether it's part of the public API, meant for internal use, deprecated, or not recommended for any other reason.