react-toastify
react-toastify copied to clipboard
Custom icon
Hello, First of all thank you for your awesome library. It would be very good to be able to add custom icon for notification. At least if we can enter 2 texts with different fonts, we can use the first one as icon and second one as message. Thanks, Best wishes
Hey @MChelik,
Thanks, glad you like it.
You can render any react component. So for your use case you could do
const Foo = () => (
<div>
<span>🦄</span>
<div className="classWithFontStyleOrWhatever">Hello</div>
</div>
)
//somewhere else
toast(<Foo />)
Is It what you are looking for? More details here
Oh right. Thank you very much.