Merged
Conversation
- revert manual changes to localization - use present tense within proptypes warnings
a19dab0 to
b1bcdde
Compare
oliviertassinari
approved these changes
Jan 27, 2021
Contributor
Author
|
@oliviertassinari thanks for the hand holding 👋 |
eps1lon
approved these changes
Jan 28, 2021
Member
eps1lon
left a comment
There was a problem hiding this comment.
Forgot to submit the review. Will follow-up.
| elevation: chainPropTypes(PropTypes.number, (props) => { | ||
| if (props.elevation > 0 && props.variant === 'outlined') { | ||
| return new Error( | ||
| 'Material-UI: Combining `elevation={>0}` with `variant="outlined"` has no effect.', |
Member
There was a problem hiding this comment.
Suggested change
| 'Material-UI: Combining `elevation={>0}` with `variant="outlined"` has no effect.', | |
| `Material-UI: Combining \`elevation={${props.elevation}}\` with \`variant="outlined"\` has no effect. Either use a different `variant` or use \`elevation={0}\`.`, |
I understand what you're trying to tell with >0 but it's not valid JS and including the actual elevation makes it easier to find.
And then we should add a test for that. You can check out the existing tests using PropTypes.checkPropTypes to find out how to test this kind of code.
Member
|
@sumarlidason Thanks! |
natac13
pushed a commit
to natac13/material-ui
that referenced
this pull request
Jan 30, 2021
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds warnings when combining elevation related props with incompatible variants.
Closes #24629