Closed DiegoAndai closed 4 weeks ago
Before and after
0.0.10
:https://github.com/mui/pigment-css/assets/16889233/c0c4fe61-4451-4a55-8128-c6a6ff6077cd
https://github.com/mui/pigment-css/assets/16889233/58b05050-db8e-449c-b920-0c3bce9ed46a
@brijeshb42 when running the demos with this PR's build, the following code on one of the demos errored:
function RedBar() {
return (
<Box
sx={{
height: 20,
backgroundColor: (theme) =>
theme.palette.mode === 'light'
? 'rgba(255, 0, 0, 0.1)'
: 'rgb(255 132 132 / 25%)',
}}
/>
);
}
With:
theme is not defined
This didn't happen when running with 0.0.10
. Why might this be? I would expect it to fail on both versions, specially as this change is not related to the sx
prop or theme handling.
I'll have to check. There was a change by @siriwatknp where he changed the callback argument from being ({theme}) =>
to (theme) =>
to be same as system. This might be the reason.
Follow up on https://github.com/mui/material-ui/pull/42358#pullrequestreview-2081441990
Merge props and
ownerState
the same way it's done in MUI System'screateStyled
cc: @mnajdova