Skip to content

Commit

Permalink
[docs] Fix custom Snackbar width on mobile (#21948)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruhci28 committed Jul 26, 2020
1 parent 7070a79 commit 557c4ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion docs/src/pages/components/snackbars/CustomizedSnackbars.js
Expand Up @@ -15,6 +15,9 @@ const useStyles = makeStyles((theme) => ({
marginTop: theme.spacing(2),
},
},
alert: {
width: '100%',
},
}));

export default function CustomizedSnackbars() {
Expand All @@ -39,7 +42,11 @@ export default function CustomizedSnackbars() {
Open success snackbar
</Button>
<Snackbar open={open} autoHideDuration={6000} onClose={handleClose}>
<Alert onClose={handleClose} severity="success">
<Alert
onClose={handleClose}
severity="success"
className={classes.alert}
>
This is a success message!
</Alert>
</Snackbar>
Expand Down
9 changes: 8 additions & 1 deletion docs/src/pages/components/snackbars/CustomizedSnackbars.tsx
Expand Up @@ -15,6 +15,9 @@ const useStyles = makeStyles((theme: Theme) => ({
marginTop: theme.spacing(2),
},
},
alert: {
width: '100%',
},
}));

export default function CustomizedSnackbars() {
Expand All @@ -39,7 +42,11 @@ export default function CustomizedSnackbars() {
Open success snackbar
</Button>
<Snackbar open={open} autoHideDuration={6000} onClose={handleClose}>
<Alert onClose={handleClose} severity="success">
<Alert
onClose={handleClose}
severity="success"
className={classes.alert}
>
This is a success message!
</Alert>
</Snackbar>
Expand Down

0 comments on commit 557c4ad

Please sign in to comment.