Skip to content

Commit

Permalink
chore: solve errror
Browse files Browse the repository at this point in the history
  • Loading branch information
namdaeun committed Jan 15, 2025
1 parent 0dd3635 commit 998921e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ui/src/Toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createPortal } from "react-dom";

import { containerStyle } from "@/Toast/Toast.style";
import { Timeout } from "@/types";
import { IcCautionToast, IcSuccess } from "@tiki/icon";
import { IcError, IcSuccess } from "@tiki/icon";

export interface ToastProps extends ComponentPropsWithoutRef<"div"> {
variant?: "error" | "success" | "default";
Expand All @@ -20,7 +20,7 @@ const Toast = ({ variant, children, showDuration = 3000, onClose, ...props }: To
const hideRef = useRef<Timeout>();

const Icon = () => {
if (variant === "error") return <IcCautionToast width={16} height={16} />;
if (variant === "error") return <IcError width={16} height={16} />;
if (variant === "success") return <IcSuccess width={16} height={16} />;
return null;
};
Expand Down Expand Up @@ -52,7 +52,7 @@ const Toast = ({ variant, children, showDuration = 3000, onClose, ...props }: To
<span>{children}</span>
<Icon />
</div>,
document.getElementById("toast-container") as Element
document.getElementById("toast-container") as Element,
)
);
};
Expand Down

0 comments on commit 998921e

Please sign in to comment.