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
The main reason to have similar typing between createBox and Box is to take advantage of the SxProps typing that Box has on its sx prop, where as a Box returned from createBox does not have this prop typed.
Your environment 🌎
See codesandbox.
The text was updated successfully, but these errors were encountered:
Duplicates
Latest version
Current behavior 😯
When importing from
@mui/system
,createBox
has the type signature(...) => React.ElementType<any>
where as
Box
isOverridableComponent<BoxTypeMap<{}, "div">>
.Expected behavior 🤔
createBox
should return a type similar to that of theBox
Steps to reproduce 🕹
See the codesandbox: https://codesandbox.io/s/naughty-booth-pxels?file=/src/Demo.tsx
Context 🔦
The main reason to have similar typing between
createBox
andBox
is to take advantage of theSxProps
typing thatBox
has on itssx
prop, where as aBox
returned fromcreateBox
does not have this prop typed.Your environment 🌎
See codesandbox.
The text was updated successfully, but these errors were encountered: