-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
Fix snackbars of different width being left-aligned #376
Conversation
pointerEvents: 'none', | ||
[collapse.container]: { | ||
pointerEvents: 'all', | ||
}, |
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.
I found this part is making the snack bar untouchable. pointer-events
never get unset to all
. I guess collapse.container
rules do not apply. Can you check again? Thanks
container: '& > .MuiCollapse-container', | ||
wrapper: '& > .MuiCollapse-container > .MuiCollapse-wrapper', |
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.
Oh, I guess the problem is these two selectors. Those selectors do not appear in our DOM structure so pointer-events: all
does not apply.
@@ -4,37 +4,71 @@ import { makeStyles } from '@material-ui/core/styles'; | |||
import { SNACKBAR_INDENTS } from './utils/constants'; | |||
import { SnackbarProviderProps } from '.'; | |||
|
|||
const useStyle = makeStyles(theme => ({ | |||
const collapse = { | |||
container: '& > .MuiCollapse-container', |
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.
This CSS class is deprecated. See mui/material-ui#24084
And I guess it is removed in v5
See #373 for more context.