Skip to content

An opinionated toast component for React.

fix: apply classnames when using toast[type] (#383)

Kinbauma869bd553083
diff --git a/src/index.tsx b/src/index.tsx
index a76b552..802c367 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -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)}