fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.33k stars 676 forks source link

Pass a component like icon to override the content #1018

Open julioflima opened 8 months ago

julioflima commented 8 months ago

Feature

To implement a personalized toasts like in below:

I had to override all toast.error and toast.success

toast.error(DataToast, {
     data: { content: t('account_details.phone_number_verification.attempt_failed') }
});

So the solution to achieve this, maybe could be passing a general component, to achieve change in all toasts the dev just gonna have to update in one place.

I'd like to thank you about this awesome lib, in special passing the status of the type triggered as prop.

image

fkhadra commented 8 months ago

Hey @julioflima not sure to fully understand your request, could you share more details please?