Skip to content

Commit

Permalink
feat: 삭제될때 저 부드럽게 삭제되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyonun321 committed Nov 28, 2024
1 parent df786a3 commit 68273ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/src/components/Toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ export const Toast = ({ message, duration = 3000, onClose }: ToastProps) => {
};
if (!isVisible) return null;
return (
<div
<motion.div
className={ToastWrapper}
style={{
opacity: isClosing ? 0 : 1,
transform: isClosing ? "translateY(100%)" : "translateY(0)",
transition: "all 0.3s ease-in-out",
}}
exit={{ opacity: 0 }}
>
<motion.div
initial={{ width: "0%" }}
Expand All @@ -53,6 +54,6 @@ export const Toast = ({ message, duration = 3000, onClose }: ToastProps) => {
<div className={CloseItemBox} onClick={handleClose}>
<CloseIcon />
</div>
</div>
</motion.div>
);
};

0 comments on commit 68273ae

Please sign in to comment.