material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[system] Use the CustomSystemProps interface in Box Props

Open IgnusG opened this issue 2 years ago • 6 comments
trafficstars

Resolves https://github.com/mui/material-ui/issues/35565

IgnusG avatar Dec 23 '22 14:12 IgnusG

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.)

IgnusG avatar Jan 13 '23 10:01 IgnusG

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.)

@mnajdova would know better.

ZeeshanTamboli avatar Jan 18 '23 12:01 ZeeshanTamboli

Also please update with latest master branch to fix the CI.

ZeeshanTamboli avatar Jan 18 '23 12:01 ZeeshanTamboli

Hi, there any new about this PR?

JoseGalRe avatar Apr 27 '23 03:04 JoseGalRe

Netlify deploy preview

Bundle size report

No bundle size changes

Generated by :no_entry_sign: dangerJS against 720b933ff8d6b302da229cbf78187ba4ef365b91

mui-bot avatar May 02 '23 08:05 mui-bot

@ZeeshanTamboli I will include the requested changes 👍

IgnusG avatar May 02 '23 13:05 IgnusG

Cleaning up 🚧

IgnusG avatar Jun 26 '24 14:06 IgnusG