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
I have searched the issues of this repository and believe that this is not a duplicate.
Summary 💡
When there is array of values specified for the spacing inside the theme, the spacing system function returns unexpected value, without adding any warning that this isn't supported.
We could probably fix this by making this test pass:
it('should error dev that array values for the theme.spacing cannot be combined with non integer values for the system',()=>{letoutput;expect(()=>{output=spacing({theme: {spacing: [1,2,3,4,5,6],},p: 0.5,});}).toErrorDev('Material-UI: The `theme.spacing` array type cannot be combined with non integer values.\n'+'You should either use an integer value that can be used as index, or define the `theme.spacing` as a number.',);expect(output).to.deep.equal({padding: undefined});});
Summary 💡
When there is array of values specified for the
spacing
inside the theme, thespacing
system function returns unexpected value, without adding any warning that this isn't supported.We could probably fix this by making this test pass:
Examples 🌈
This is one example of non valid usage
Motivation 🔦
This will explicitly ensure that we are thinking about all invalid cases that can be used, and can guide the developers towards the correct approach.
First reported on #23053 (comment)
The text was updated successfully, but these errors were encountered: