Skip to content

Commit

Permalink
[FX-4530] Fix Notification banner on smaller screens (#4029)
Browse files Browse the repository at this point in the history
* [FX-4530] Fix Notification banner on smaller screens

* Add changeset
  • Loading branch information
mkrl authored Nov 29, 2023
1 parent 445e4f5 commit a7e202a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .changeset/smooth-pillows-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@toptal/picasso": patch
---

### Notification

- fix banner-type `Notification` padding for responbsible screen sizes

18 changes: 15 additions & 3 deletions packages/picasso/src/Notification/styles.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import type { Theme } from '@material-ui/core/styles'
import { createStyles } from '@material-ui/core/styles'
import { PicassoProvider } from '@toptal/picasso-provider'
import {
breakpointsList as breakpoints,
PicassoProvider,
} from '@toptal/picasso-provider'
import { rem } from '@toptal/picasso-shared'

PicassoProvider.override(({ layout }: Theme) => ({
PicassoProvider.override(({ layout, breakpoints: { down } }: Theme) => ({
MuiSnackbarContent: {
message: {
display: 'flex',
Expand All @@ -12,7 +15,9 @@ PicassoProvider.override(({ layout }: Theme) => ({
width: '100%',
minWidth: 0,
margin: '0 auto',

[down(breakpoints.xl)]: {
maxWidth: 'unset',
},
'& > div': {
width: '100%',
},
Expand All @@ -23,6 +28,7 @@ PicassoProvider.override(({ layout }: Theme) => ({
export default ({
palette: { red, green, yellow, common, text },
shadows,
breakpoints: { down },
sizes: { borderRadius },
}: Theme) =>
createStyles({
Expand Down Expand Up @@ -55,6 +61,12 @@ export default ({
notificationYellow: {
background: yellow.lighter,
padding: `1.5em ${rem('130px')}`,
[down(breakpoints.lg)]: {
padding: '1.5em',
},
[down(breakpoints.sm)]: {
padding: '1.5em 1em',
},
},

// Content
Expand Down

0 comments on commit a7e202a

Please sign in to comment.