Skip to content

Commit

Permalink
VUU-333: Fix Toast Animation (finos#1042)
Browse files Browse the repository at this point in the history
* SLVUU-123: Add nominal timeout before setting toast position

* SLVUU-123: Remove toastContainer class
  • Loading branch information
pling-scottlogic authored Dec 5, 2023
1 parent f931d6b commit 69509a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const NotificationsProvider = (props: {
return (
<NotificationsContext.Provider value={{ notify }}>
<div
className={`${classBase}-toastContainer`}
style={{
width:
toastWidth + toastContainerRightPadding + toastContainerLeftPadding,
Expand Down Expand Up @@ -94,7 +93,10 @@ export const ToastNotification = (props: ToastNotificationProps) => {
const [right, setRight] = useState(-toastWidth - toastContainerRightPadding);

useEffect(() => {
setRight(toastContainerRightPadding);
setTimeout(
() => setRight(toastContainerRightPadding)
);

if (animated) {
setTimeout(
() => setRight(-toastWidth - toastContainerRightPadding),
Expand Down
10 changes: 0 additions & 10 deletions vuu-ui/packages/vuu-popups/src/notifications/notifications.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
.vuuToastNotifications-toastContainer {
--top: 60px;
position: absolute;
right: 0;
top: var(--top);
overflow: hidden;
height:calc(100% - var(--top));
font-size: 12px;
}

.vuuToastNotifications-toast {
--vuu-icon-size: 24px;
position: absolute;
Expand Down

0 comments on commit 69509a4

Please sign in to comment.