Skip to content

Commit

Permalink
fix(toast-bar): use fragment to remove unique key prop error
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisaraiva19 committed May 24, 2021
1 parent b22bacb commit 6c89e91
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/components/toast-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,17 @@ export const ToastBar: React.FC<ToastBarProps> = React.memo(
...toast.style,
}}
>
{typeof children === 'function'
? children({
icon,
message,
})
: [icon, message]}
{typeof children === 'function' ? (
children({
icon,
message,
})
) : (
<>
{icon}
{message}
</>
)}
</ToastBarBase>
);
}
Expand Down

0 comments on commit 6c89e91

Please sign in to comment.