You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned on this Changelog component prop was removed from BoxProps type as Box already has it and that we can use it when we are using it as Styled component like mentioned in the change log. This restricts using component as prop even when we use Box directly as an element.
Expected behavior
When using Box as element, we should be able to pass component prop.
Context
Rather than having to use type casting and using styled, users should be able to pass component prop when using Box directly as an element.
Search keywords
Box, BoxProps
Latest version
Steps to reproduce
Steps:
OR
Check type of BoxProps
Current behavior
As mentioned on this Changelog component prop was removed from BoxProps type as Box already has it and that we can use it when we are using it as Styled component like mentioned in the change log. This restricts using component as prop even when we use Box directly as an element.
Expected behavior
When using Box as element, we should be able to pass component prop.
Context
Rather than having to use type casting and using styled, users should be able to pass component prop when using Box directly as an element.
For reference, Stack type is as follows:
While Box type is as follows:
Your environment
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: