[Box] Add breakpoint value support to maxWidth prop#26984
Conversation
|
@ansh-saini could we add a test case? |
|
Sure, but I'm a little confused, there are two test files for |
|
Don't test this at the Box's level. Test the transformation behavior instead. https://github.com/mui-org/material-ui/blob/next/packages/material-ui-system/src/styleFunctionSx/styleFunctionSx.test.js or https://github.com/mui-org/material-ui/blob/next/packages/material-ui-system/src/style.test.js not sure which one is better. |
mnajdova
left a comment
There was a problem hiding this comment.
Let's also update the documentation for the sx prop - https://github.com/mui-org/material-ui/blob/next/docs/src/pages/system/the-sx-prop/the-sx-prop.md#sizing
|
@mnajdova The sx or the https://next.material-ui.com/system/sizing/#width page? I thought we said that sx was to give an overview and the flat props to go into the details :) |
My opinion was that every custom transformation should be on the https://github.com/mui-org/material-ui/blob/next/docs/src/pages/system/the-sx-prop (not including the pure CSS props that does not have any transformation). As the |
@mnajdova This would mean that we need to duplicate the information between the sx page and the detailed sections. I don't think that it can work: 1. it would make it easier to get unsynchronized information, 2. the "sx props" page is better at documenting some of the custom behaviors than in the dedication pages. This seems counterproductive. the sx prop is only about the sx prop, while the other sections cover the flattened props (which are important too). |
71ac78c to
5ef0f9e
Compare
5ef0f9e to
d3c6b92
Compare
d3c6b92 to
6e10ad0
Compare
Adds breakpoint value support on Box
maxWidthprop as suggested in this commentCloses #25771
Preview: https://deploy-preview-26984--material-ui.netlify.app/system/sizing/#max-width