Closed siriwatknp closed 2 weeks ago
https://deploy-preview-42056--material-ui.netlify.app/
No bundle size changes (Toolpad) No bundle size changes
Generated by :no_entry_sign: dangerJS against a2c0967668b5cffc1861c9f3a49e6dac87b7c36b
@zanivan Yes. What you have proposed is already possible. It might be a limitation on the codemod side that the output is like that. But if you are writing the variants manually, you can do the above.
Is it possible to have something like this instead?
Good point. I'd say it's good to have because matching the props and merging the styles with codemod is a lot of work (for sure it can be done). I will improve it when I have time but at least it works at the moment.
@zanivan Yes. What you have proposed is already possible. It might be a limitation on the codemod side that the output is like that. But if you are writing the variants manually, you can do the above.
Since it was an issue with the codemod, I went ahead and merged the duplicated props—there weren't so many, actually. Let me know if that's ok, or if anything needs to be corrected
Most of the code comes from #41743 because the style conversion is the same.
Templates: https://deploy-preview-42056--material-ui.netlify.app/material-ui/getting-started/templates/ Docs: https://github.com/siriwatknp/material-ui/tree/codemod/theme-sx/packages/mui-codemod#theme-v6
Tested by transforming all the template themes.