Skip to content

Commit

Permalink
Merge pull request #1 from Kinbaum/Kinbaum-patch-1
Browse files Browse the repository at this point in the history
fix: apply classnames when using `toast[type]`
  • Loading branch information
Kinbaum committed Mar 21, 2024
2 parents d651fac + 6b005b4 commit 886ae0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,13 @@ const Toast = (props: ToastProps) => {
) : (
<>
{toastType || toast.icon || toast.promise ? (
<div data-icon="" className={cn(classNames?.icon)}>
<div data-icon="" className={cn(classNames?.icon, toast?.classNames?.icon)}>
{toast.promise || (toast.type === 'loading' && !toast.icon) ? toast.icon || getLoadingIcon() : null}
{toast.type !== 'loading' ? toast.icon || icons?.[toastType] || getAsset(toastType) : null}
</div>
) : null}

<div data-content="" className={cn(classNames?.content)}>
<div data-content="" className={cn(classNames?.content, toast?.classNames?.content)}>
<div
data-title=""
className={cn(classNames?.title, toast?.classNames?.title)}
Expand Down

0 comments on commit 886ae0b

Please sign in to comment.