-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[SnackbarContent] Fix square
prop not working
#46196
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
base: master
Are you sure you want to change the base?
[SnackbarContent] Fix square
prop not working
#46196
Conversation
Netlify deploy previewhttps://deploy-preview-46196--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
Hey @ZeeshanTamboli , I have fix the prop issue. Could you please review the PR and let me know if there’s anything else needed? Thanks! |
@0210shivam Thank you for your prompt attention, but I believe the proper change would be to remove that hard-coded border-radius completely. The component already is inheriting the proper You can see the same fix was made to the |
215a17b
to
0c62fa1
Compare
@astjohnpaycor Thanks for the feedback! I’ve made the changes and removed the hard-coded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0210shivam The logic looks good. Could you please add a test case?
Sure, I’ll add a test case and update the code shortly. Thanks for reviewing. |
square
prop not working
3358ac7
to
7e3fcfd
Compare
@ZeeshanTamboli I’ve added the test case. Please take another look when you get a chance. Let me know if anything else is needed. Thanks again for the review! |
Summary
This PR fixes an issue where the
square
prop on<SnackbarContent />
was not working as expected. Previously, theSnackbarContentRoot
component always applied a border radius, overriding the default behavior of the underlying<Paper />
component even whensquare
was set totrue
.What’s Changed
borderRadius
fromSnackbarContentRoot
to allow thesquare
prop to behave correctly via the underlying<Paper />
.MuiPaper-rounded
class is:square={true}
square
is not provided (default behavior)Test Coverage
Added tests to ensure:
square
prop disables theMuiPaper-rounded
class.square
is not passed) applies theMuiPaper-rounded
class.Related Issue
Fixes #46191