[docs] Box component
removal migration help
#43989
Labels
component: Box
The React component.
docs
Improvements or additions to the documentation
support: docs-feedback
Feedback from documentation page
Related page
https://mui.com/material-ui/migration/upgrade-to-v6/#breaking-changes-affecting-types
Kind of issue
Unclear explanations
Issue description
What to do if I have:
?
Context
Example of a real 2-y/o piece of code that I'm trying to migrate from v5 to v6:
That is later used as
So I have the combination of
a) custom prop
b) system prop (will be sx)
c) component.
If I use
styled("span")
, then I loose the system prop (or sx).If i use
styled(Box) as typeof Box
then I loose the type for custom prop.What do I do?
Search keywords: Box component styled custom props
The text was updated successfully, but these errors were encountered: