Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix propTypes in components where OverridableStringUnion is used #30682

Merged
merged 5 commits into from
Feb 2, 2022

Conversation

paales
Copy link
Contributor

@paales paales commented Jan 18, 2022

As mentioned by @mnajdova I've created a PR to add missing string annotations for props that use the OverridableStringUnion

Fixes #30715

@mui-bot
Copy link

mui-bot commented Jan 18, 2022

No bundle size changes

Generated by 🚫 dangerJS against c1108f6

@paales
Copy link
Contributor Author

paales commented Jan 20, 2022

It seems the framer:build is outputting some bogus code, no idea how to fix

paales added a commit to graphcommerce-org/graphcommerce that referenced this pull request Jan 20, 2022
Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for the contribution!

@mnajdova
Copy link
Member

It seems the framer:build is outputting some bogus code, no idea how to fix

I am afraid we need to remove these props. You can search for framer/Material-UI.framerfx/code/[Component].tsx and remove the props you have just changed.

@@ -171,7 +171,10 @@ Button.propTypes /* remove-proptypes */ = {
* The color of the component. It supports those theme colors that make sense for this component.
* @default 'primary'
*/
color: PropTypes.oneOf(['context', 'danger', 'info', 'neutral', 'primary', 'success', 'warning']),
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnajdova mnajdova changed the title add missing Proptypes.string for OverridableStringUnion fields [core] Fix propTypes in components where OverridableStringUnion is used Jan 31, 2022
@mnajdova mnajdova merged commit 8149220 into mui:master Feb 2, 2022
wladimirguerra pushed a commit to wladimirguerra/material-ui that referenced this pull request Feb 2, 2022
@paales paales deleted the fix/prop-types branch February 7, 2022 15:58
@zannager zannager added the core Infrastructure work going on behind the scenes label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LoadingButton] does not inherit custom variant override types
4 participants