-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Fix scrollbar on snackbar page #37657
[docs] Fix scrollbar on snackbar page #37657
Conversation
|
||
export interface State extends SnackbarOrigin { | ||
interface State extends SnackbarOrigin { |
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.
No need to export
@@ -17,23 +17,18 @@ export default function PositionedSnackbar() { | |||
const { vertical, horizontal, open } = state; | |||
|
|||
const handleClick = (newState: SnackbarOrigin) => () => { | |||
setState({ open: true, ...newState }); | |||
setState({ ...newState, open: true }); |
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.
To be easier to scan, matching the code below
<React.Fragment> | ||
<Grid container justifyContent="center"> | ||
<Grid item> |
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.
Removed one <div>
</Grid> | ||
|
||
<Grid container justifyContent="center"> |
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.
Code convention, no empty lines in JSX.
Netlify deploy previewhttps://deploy-preview-37657--material-ui.netlify.app/ Bundle size report |
e1f1bec
to
1ea900c
Compare
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.
Perfect, thanks |
Fix #37389, I also worked one removing components in the demo to make it easier to process.
https://deploy-preview-37657--material-ui.netlify.app/material-ui/react-snackbar/#positioned-snackbars
https://deploy-preview-37657--material-ui.netlify.app/material-ui/react-snackbar/#control-slide-direction