Skip to content

Commit

Permalink
feat: update toast component to use handleCloseToast function + anima…
Browse files Browse the repository at this point in the history
…tion exit improvements
  • Loading branch information
pheralb committed Jul 8, 2024
1 parent a5f0ec8 commit e0eb094
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion library/src/components/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const Toast = (props: ToastComponentProps) => {
{props.action.text ?? 'Action'}
</button>
)}
<button onClick={props.onClose} title="Close toast">
<button onClick={handleCloseToast} title="Close toast">
Close
</button>
</div>
Expand Down
12 changes: 6 additions & 6 deletions library/src/styles/toast-component.css
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
opacity: 1;
transform: translateX(0);
}
100% {
90% {
opacity: 0;
transform: translateX(-90%);
}
Expand Down Expand Up @@ -209,9 +209,9 @@
opacity: 1;
transform: translateY(0);
}
100% {
90% {
opacity: 0;
transform: translateY(100%);
transform: translateY(90%);
}
}

Expand All @@ -224,9 +224,9 @@
opacity: 1;
transform: translateY(0);
}
100% {
90% {
opacity: 0;
transform: translateY(-100%);
transform: translateY(-90%);
}
}

Expand All @@ -239,7 +239,7 @@
opacity: 1;
transform: translateX(0);
}
100% {
90% {
opacity: 0;
transform: translateX(90%);
}
Expand Down

0 comments on commit e0eb094

Please sign in to comment.