Use IconButton for nicer "edit" and "remove revision" icons, and set default appearance for all buttons #665
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.
It's probably easier to look at commits separately.
Commit 1: uses IconButton instead of Button for some of our icons -- namely the "edit" button and the "remove revision" button. This makes these buttons much nicer in the process, especially on hover. Note that this was needed for setting the variant by default in commit 2, that's why I included it in this PR too.
Commit 2: set some defaults for all buttons: variant = contained so that they look like button, and disableElevation to remove box shadows. I think that the shared styles do some of "variant = contained" too and we might want to simplify them later, but I didn't want to do that now. (see https://mui.com/material-ui/customization/theme-components/#theme-default-props about this -- we could also add
disableRipple
if we want to)Commit 3: remove the "variant" property where appropriate now that it's set globally.
Commit 4: update test snapshots
To summarize visible changes:
I think that the only debatable change is making the variant contained by default. It can still be overriden on a case by case basis by using
variant="text" or "outlined"
.Please tell me what you think!
Deploy preview
Production version
Before:
After: