material-ui
material-ui copied to clipboard
[system] Use the CustomSystemProps interface in Box Props
- [X] I have followed (at least) the PR section of the contributing guide.
Resolves https://github.com/mui/material-ui/issues/35565
Should we also add a test that the custom system prop provided directly to the system components (Box, Typography, etc) applies the styling properly (probably from the theme?) ?
I think this might be out of scope for this PR. It's up to the user to make sure these props are handled correctly by I think using this experimental API for handling sx which system props use internally to decide what to do with props that are custom?
Without using this API it can still be useful to use CustomSystemProps for restricting the values on existing custom props, eg. forcing fontWeight to only accept values medium and bold (which map to fontWeightMedium and fontWeightBold in the theme) instead of allowing anything including custom font size numbers (200, 300 etc.)
Should we also add a test that the custom system prop provided directly to the system components (Box, Typography, etc) applies the styling properly (probably from the theme?) ?
I think this might be out of scope for this PR. It's up to the user to make sure these props are handled correctly by I think using this experimental API for handling
sxwhich system props use internally to decide what to do with props that are custom?Without using this API it can still be useful to use
CustomSystemPropsfor restricting the values on existing custom props, eg. forcingfontWeightto only accept valuesmediumandbold(which map tofontWeightMediumandfontWeightBoldin the theme) instead of allowing anything including custom font size numbers (200, 300 etc.)
@mnajdova would know better.
Also please update with latest master branch to fix the CI.
Hi, there any new about this PR?
Netlify deploy preview
Bundle size report
Generated by :no_entry_sign: dangerJS against 720b933ff8d6b302da229cbf78187ba4ef365b91
@ZeeshanTamboli I will include the requested changes 👍
Cleaning up 🚧