Skip to content

Commit

Permalink
fix: max width on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Jan 16, 2025
1 parent 6947f2a commit 51787d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/beacon-ui/src/components/toast/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ const Toast: React.FC<ToastProps> = (props: ToastProps) => {
setPosition([mx, my])
})

const isMobile = isMobileOS(window)

useEffect(() => {
if (isRequestSentToast) {
setShowMoreInfo(false)
Expand All @@ -65,7 +67,8 @@ const Toast: React.FC<ToastProps> = (props: ToastProps) => {
position: 'absolute',
transform: `translate3d(${x}px, ${y}px, 0)`,
// Required
touchAction: 'none'
touchAction: 'none',
minWidth: !isMobile ? 460 : undefined
}}
className={props.open ? 'toast-wrapper-show' : 'toast-wrapper-hide'}
{...bindDrag()}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-ui/src/components/toast/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.toast-wrapper-show {
user-select: none;
cursor: move;
max-width: 460px;
overflow: hidden;
background-color: white;
Expand Down Expand Up @@ -32,7 +33,6 @@
}

.toast-header {
cursor: move;
padding: 0px 0.6em 0px 1.2em;
display: flex;
align-items: center;
Expand Down

0 comments on commit 51787d4

Please sign in to comment.