Skip to content

Commit

Permalink
Fixes #232 - Fix bug with snackbar not being centered on screens
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhosseindhv committed May 8, 2020
1 parent 828fdc3 commit a7826d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Thanks to all contributers who improved notistack by opening an issue/PR.
* **@david-chau**: Allow `asc`, `desc` or custom sort order of snackbars [#160](https://github.com/iamhosseindhv/notistack/issues/160)
* **@iinitz**: Enforce white text for dark theme [#241](https://github.com/iamhosseindhv/notistack/pull/241)
* **@fbarbare**: Let Mat UI handle the font and border-radius [#262](https://github.com/iamhosseindhv/notistack/pull/262)
* **@tomohiro-iwana @JuanmaMenendez**: Fix bug with snackbar not being centered on `xs` screens [#232](https://github.com/iamhosseindhv/notistack/issues/232)

<br />

Expand Down
7 changes: 4 additions & 3 deletions src/SnackbarContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ const useStyle = makeStyles(theme => ({
rightDense: { right: SNACKBAR_INDENTS.view.dense },

center: {
[theme.breakpoints.up('md')]: {
left: '50%',
transform: 'translateX(-50%)',
left: '50%',
transform: 'translateX(-50%)',
[theme.breakpoints.down('xs')]: {
transform: 'translateX(0)',
},
},
}));
Expand Down

0 comments on commit a7826d3

Please sign in to comment.