How i do it?
toast.warn("Error 400\nField text invalid")
\n and <br/> not wrapping text.
Hello @neetocode,
You could use jsx instead as follow:
toast.warn(<div>Error 400 <br />Field text invalid<div>)
Quote are not needed with jsx.
cool!
How about if we are using .js? How are we going to have a new line
So, How to pass a variable inside toast
for example
var msg= 'Hello World';
i passed this msg varible into toastr like this...
toast.error(<div>msg<div>)
the toaster is showing "msg" not "Hello World".
someone give the right solution pls
@Navaruban you could do as follow:
let msg = "Hello";
toast.error(() => <div>${msg}</div>);
I have a long text like
toast.success("MYSUCCESSMYSUCCESSMYSUCCESSMYSUCCESSMYSUCCESS");
The above text is not getting word wrap. The text is beyond the display part of toast.
Need the second toast to be word wrap

I have a long text like
toast.success("MYSUCCESSMYSUCCESSMYSUCCESSMYSUCCESSMYSUCCESS");The above text is not getting word wrap. The text is beyond the display part of toast.
Need the second toast to be word wrap
Did you find any solution for this @fkhadra ?
Most helpful comment
Hello @neetocode,
You could use jsx instead as follow:
Quote are not needed with jsx.