Skip to content

Commit

Permalink
[FX-4530] Fix Notification banner on smaller screens
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrl committed Nov 28, 2023
1 parent a1ad38f commit b25aa80
Showing 1 changed file with 15 additions and 3 deletions.
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.xl)]: {
padding: '1.5em',
},
[down(breakpoints.sm)]: {
padding: '1.5em 1em',
},
},

// Content
Expand Down

0 comments on commit b25aa80

Please sign in to comment.