Skip to content

Commit

Permalink
Fix width of the NotificationToast on narrow viewports (#1607)
Browse files Browse the repository at this point in the history
* Fix toast width on mobile

* Add changeset
  • Loading branch information
connor-baer authored Jun 10, 2022
1 parent 5ddd7a8 commit 46fa52e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-starfishes-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': patch
---

Fixed the width of the `NotificationToast` component on narrow viewports.
12 changes: 10 additions & 2 deletions packages/circuit-ui/components/ToastContext/ToastContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,20 @@ export interface ToastProviderProps {

const listWrapperStyles = ({ theme }: StyleProps) => css`
position: fixed;
width: 100%;
padding: 0 ${theme.spacings.giga};
bottom: ${theme.spacings.giga};
left: 50%;
transform: translateX(-50%);
left: 0;
display: flex;
flex-direction: column-reverse;
z-index: ${theme.zIndex.toast};
${theme.mq.kilo} {
width: auto;
padding: 0;
left: 50%;
transform: translateX(-50%);
}
`;

const ListWrapper = styled('ul')(listWrapperStyles);
Expand Down

1 comment on commit 46fa52e

@vercel
Copy link

@vercel vercel bot commented on 46fa52e Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.