Skip to content

Commit

Permalink
fix: toast collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Nov 15, 2023
1 parent f31aa29 commit e83bc9c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/beacon-ui/src/components/toast/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ const Toast: Component<ToastProps> = (props: ToastProps) => {

const onMouseMoveHandler = (event: MouseEvent) => {
if (isDragging() && event.buttons === 1) {
const newX = Math.min(Math.max(event.clientX - offset.x, 0), window.innerWidth - 460)
const newY = Math.min(Math.max(event.clientY - offset.y, 0), window.innerHeight - 12)

setDivPosition({
x: event.clientX - offset.x,
y: event.clientY - offset.y
})
x: newX,
y: newY,
});
}
}

Expand Down

0 comments on commit e83bc9c

Please sign in to comment.